You could use the NumberFormatter class like this: var myRoundedNumber:NumberFormatter = new NumberFormatter(); myRoundedNumber.precision = 1; myRoundedNumber.rounding = "nearest"; myRoundedNumber.format(medianOfArrayVariable);
--- In flexcoders@yahoogroups.com, "Mark" <[EMAIL PROTECTED]> wrote: > > I'm trying to find the median in my Array of numbers which is fine but > in some cases that number comes out to something like (3.92 84.5 > 3.5599999999999996 3.665). In ActionScript how do I take that number > and reduce the length to something more manageable like (3.9, 84.5, > 3.6, 3.7). I know how to round up to whole numbers but not like this. > > Anyone know? > > Thanks >