/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function roundOff ( value : Number, decimalPlaces : int ) : Number { var k : int = Math.pow ( 10, decimalPlaces ); value *= k; value = Math.round ( value ); return value / k; }