Tutorials, extensions, and source files for ActionScript, Flash, and other Adobe products.

 

senocular.com ActionScript Library

roundBy.as

1
2
3
4
function roundBy(num, decimalPlaces){
	decimalPlaces = Math.pow(10, decimalPlaces);
	return Math.round(num*decimalPlaces)/decimalPlaces;
}