Dividing by zero does not return an error, because the result is Infinite or NaN. Replace try with min.
Example: min((32.0 / 0), 0.0)
returns 0.0
That said, you should be testing your values before the calculation is done.
Dividing by zero does not return an error, because the result is Infinite or NaN. Replace try with min.
Example: min((32.0 / 0), 0.0)
returns 0.0
That said, you should be testing your values before the calculation is done.