Add an `Approximately` method with larger comparison
Closed this issue · 0 comments
DarkRewar commented
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.