Currently, the Mathf.Approximately() does not work with value that aren't the "same".
For example, if the velocity of a rigidbody is near to 0, but not quite 0 (like 1E-24), the Mathf.Approximately(velocity.magnitude, 0) returns false.
This issue needs to create an Approximately method under MathUtils that can handle a third parameter which is the maximum difference allowed in the comparison.
Currently, the
Mathf.Approximately()
does not work with value that aren't the "same".For example, if the velocity of a rigidbody is near to 0, but not quite 0 (like 1E-24), the
Mathf.Approximately(velocity.magnitude, 0)
returnsfalse
.This issue needs to create an Approximately method under
MathUtils
that can handle a third parameter which is the maximum difference allowed in the comparison.