The number should not be round.
Use Math.floor to round down and you can use Math.pow to generically set the number of digits.
function trimDP(x, i) {
var e = Math.pow(10, i || 0);
return Math.floor(e * x) / e;
}
trimDP(2.45991, 2); // 2.45
If you want this as a String, you need to use .toFixed(i)
after so that it doesn't get rounded.
var x = trimDP(2.40001, 2); // 2.4
x.toString(2); // "2.40"