最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - select the highest value in a set of 3 numbers using flash as3 - Stack Overflow

programmeradmin4浏览0评论

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 badges
Add a ment  | 

2 Answers 2

Reset to default 10

ActionScript 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))
发布评论

评论列表(0)

  1. 暂无评论