Skip to content

Warning due to Implicit Type Conversion in graphene-simd4x4f.h #281

@PeterGriffinSr

Description

@PeterGriffinSr

A compiler warning occurs in graphene-simd4x4f.h (line 659) due to an implicit type conversion from float to double:

if (fabs (graphene_simd4f_get_z (up) - 1.0) < FLT_EPSILON)

This causes the -Wdouble-promotion warning.

Suggested Fix:
To avoid this warning, cast the operands to double:

if (fabs ((double)graphene_simd4f_get_z(up) - (double)1.0) < (double)FLT_EPSILON)

Note:
This is just a warning and does not impact functionality if left unfixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions