Actionscript:
-
trace("min", Math.min(100, 99, 32, 75, 44, 90));
-
trace("max", Math.max(100, 99, 32, 75, 44, 90));
-
/*outputs:
-
32
-
100
-
*/
It's easy not to notice that Math.min() and Math.max() can take any number of arguments. I've seen people nest min/max calls instead of using the above option.... like this:
Actionscript:
-
trace(Math.min(1, Math.min(2, 3)));