2010-08-24, 06:00 PM
I see what you did there, Hazzy.
Fiel, I've been using the following function to floor numbers:
function floor0(number) {
return Math.floor(number*Math.pow(10,0))/Math.pow(10,0);
}
But what do you do when you've got several places this needs to be enacted? For example, this is my Total LUK formula for MS calculations:
tLUKres = floor0((parseInt(inputbLUK)*maple_warrior) + (parseInt(inputbLUK)*(maple_warrior-1)*luk_percent));}
the way I see it, I'd have to calculate everything individually with new variables like this:
a_luk = floor0(parseInt(inputbLUK)*maple_warrior)
b_luk = floor0(parseInt(inputbLUK)*(maple_warrior-1)*luk_percent)
tLUKres = a_luk + b_luk
would that be the best way?
Thank you in advance.
Fiel, I've been using the following function to floor numbers:
function floor0(number) {
return Math.floor(number*Math.pow(10,0))/Math.pow(10,0);
}
But what do you do when you've got several places this needs to be enacted? For example, this is my Total LUK formula for MS calculations:
tLUKres = floor0((parseInt(inputbLUK)*maple_warrior) + (parseInt(inputbLUK)*(maple_warrior-1)*luk_percent));}
the way I see it, I'd have to calculate everything individually with new variables like this:
a_luk = floor0(parseInt(inputbLUK)*maple_warrior)
b_luk = floor0(parseInt(inputbLUK)*(maple_warrior-1)*luk_percent)
tLUKres = a_luk + b_luk
would that be the best way?
Thank you in advance.

