I have a set of variables of type "integer" and I just want to take the greatest of these values, and set as the value for some new variable. How would I do this in as3? (or any language, I suppose)
I have a set of variables of type "integer" and I just want to take the greatest of these values, and set as the value for some new variable. How would I do this in as3? (or any language, I suppose)
Share Improve this question asked Apr 28, 2011 at 18:40 mheaversmheavers 30.2k63 gold badges200 silver badges326 bronze badges2 Answers
Reset to default 10ActionScript 3:
var highest:Number = Math.max(first, second, third);
where first, second and third are Numbers or ints.
Math.max(var1, Math.max(var2, var3))