I recently discovered that the epsilon used is this:
define CMP_EPSILON 0.00001
(Is there a way to change default EPSILON tolerance?)
I try to make do with that as much as possible and usually it is fine. On the odd occasion it isn’t, I just define my own EPSILON const and compare the lerped value with that.
I thought nobody else would have a problem with this and I was just being too fussy, but perhaps having an optional second value in that function might be worth a PR after all?
bool is_zero_approx(x: float, epsilon: float = 0.00001)
In the docs:
For example:
if is_zero_approx(some_value, 0.001):
# some code here
if is_equal_approx(some_value, some_other_value, 0.001):
# some code here
The float 0.001 value being optional and uses the default EPSILON if not included.