P
Paul Morrison
I have the following code:
m = Math.ceil(((Math.log(R) - Math.log(P*(1-J) + R))/(Math.log(J))));
It is to work out the number of months it will take to pay back a loan with
3 givens. The problem is that m is months, and must be an integer, whereas
the ceil method returns a double. How do I get around this, I have looked
for toInt or toInteger methods, but cant find anything like it.
Thanks for your time
Paul Morrison
m = Math.ceil(((Math.log(R) - Math.log(P*(1-J) + R))/(Math.log(J))));
It is to work out the number of months it will take to pay back a loan with
3 givens. The problem is that m is months, and must be an integer, whereas
the ceil method returns a double. How do I get around this, I have looked
for toInt or toInteger methods, but cant find anything like it.
Thanks for your time
Paul Morrison