Daily Godot Tip #18: If you are using floats but want to make sure value checks aren't messed up by floating-point precision, godot has a built in is_equal_approx(float, float) function
Daily Godot Tip #18: If you are using floats but want to make sure value checks aren't messed up by floating-point precision, godot has a built in is_equal_approx(float, float) function
This is usable in any script. It checks to see if the two values differ by a very small value
Alt text: Code that says print(is_equal_approx(1, 0.99999999999)) and then the console log which has printed out true.