lets say i do some simple AS3 math and get a Number of 199.
How can i use a Array with values of “preferred” numbers, compare the 199 to the array and round up or down to the closest value in the array?
var myNumber:Number = 199;
var myArray = new Array(100,175,190,200);
var myMatch = 200;
output.text = myMatch;
I want to round the 199 up to 200(closest match) and have the myMatch = the rounded number from the array.
Thank You!!!