Skip to content

raylib.FloatEquals

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Check whether two given floats are almost equal

Parameters

Parameter Default Value Note
x 0
y 0

Return value

Condition Return Value
(always) number

Notes

Example

a = 0.1 + 0.2
b = 0.3
print raylib.FloatEquals(a, b)  // 1 (true — within epsilon)
print raylib.FloatEquals(1.0, 2.0)  // 0 (false)

Clone this wiki locally