Menu
I’ve just started diving into Javascript and noticed that the Math.ceil() function only takes 1 parameter and just rounds up to the next whole number. So I was wondering if anyone has written (or has any ideas on writing) a ceiling function with 2 parameters, like the M$ Excel one. For example:
ceil( .68, 1) = 1
ceil( .68, .25) = .75
I’ve written one in C++ for PalmOS, because it too only has the 1 parameter function. But porting it to JS would be a complete pain, especally because I’m just getting into JS. So if anyone has done this before and would like to help out, it would be greatly appreciated.
Z