Answered
Capping math calculation at zero?
Hi guys
How do you cap a maths calc so that if it's capped at zero if the result was going to be negative? Is there a func?
Cheers
Hi guys
How do you cap a maths calc so that if it's capped at zero if the result was going to be negative? Is there a func?
Cheers
:
yourcalculatedvalue = Math.max(0,yourcalculatedvalue)
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.