posted 17 years ago
Converting to text and splitting on the decimal point is both inefficient and subject to localisation issues (e.g. '.' versus ','). Using the Math library is the way to go, I think.
Look at Math.floor().
Compare and contrast to Math.ceil() and Math.round(), which have similar functionality, but subtle important differences.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.