Can someone explain to me how the isequalapprox method works? I've read the documents, but I couldn't quite understand how it works, especially regarding the function parameters.

Godot version v. 3.3.2
in Engine

+1 vote

### Floating Point Imprecision

It turns out that most fractional decimals cannot be represented precisely in binary and so there are a lot of fractional decimals that are approximated when stored in the computer causing what is known as floating point imprecision

How then do you decide that two floating points shall be considered equal?
That's called an epsilon (Greek Letter) which is used by `Is_equal_approx` and the function name is self explanatory hence the vague documentation.

``````Is_equal_approx(1.333333333, 1.4) # yes it is
``````

Same should apply for Rects, Basis, Vectors, Transforms

by (4,560 points)
selected by
+1 vote

Hi
the function will return true when a and b are equal or only have a very slight deviation.

The tolerance scales with size of the numbers. Higher numbers are treated with a higher tolerance when compared.

by (3,932 points)