Copy link to clipboard
Copied
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)
Copy link to clipboard
Copied
:
yourcalculatedvalue = Math.max(0,yourcalculatedvalue)
Copy link to clipboard
Copied
Thanks kglad - I'll slot that in today.
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now