graphene
graphene copied to clipboard
Warning due to Implicit Type Conversion in graphene-simd4x4f.h
trafficstars
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.