MCPcopy Create free account
hub / github.com/RobLoach/raylib-cpp / RaylibAssertFloatEq

Function RaylibAssertFloatEq

tests/raylib-assert.h:99–104  ·  view source on GitHub ↗

Internal helper: true when two floats are within RAYLIB_ASSERT_EPSILON of each other.

Source from the content-addressed store, hash-verified

97
98// Internal helper: true when two floats are within RAYLIB_ASSERT_EPSILON of each other.
99static inline bool RaylibAssertFloatEq(float a, float b)
100{
101 float delta = a - b;
102 if (delta < 0.0f) delta = -delta;
103 return delta <= RAYLIB_ASSERT_EPSILON;
104}
105
106// Internal helper: true when two color channels differ by no more than the given tolerance.
107static inline bool RaylibAssertChannelWithin(int a, int b, int tolerance)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected