The following will ensure that any large numbers will only be precise to the hundredths place (related to this answer):
public function round( sc:Number ):Number
{
sc = sc * 100;
sc = Math.floor( sc );
sc = sc / 100;
return sc;
}
What is the optimal way to round my numbers to the precision of .05? Is there something clever to be done with bit-shifting to get this result? For example, I would like:
3.4566 = 3.45
3.04232 = 3.05
3.09 = 3.1
3.32 = 3.3