/ Published in: ActionScript 3
Expand |
Embed | Plain Text
function randomNumber(low:int = 0, high:int = 0):int{ var low:int = low; var high:int = high; if(low == high) throw new Error("low & high value must be the same"); return Math.round(Math.random() * (high - low)) + low; }
You need to login to post a comment.
