Rounding
function roundToDecimal( number, decimalPlaces ){
var multiplier = Math.pow( 10, decimalPlaces );
return Math.round( number * multiplier ) / multiplier;
}
function roundNearest( number, nearest ){
return Math.round( number / nearest ) * nearest;
}