I'd like to believe that the java.math API could actually assist, and have been experimenting with the nextUp() and round() methods. However, each time i try to use one of these, i get a method - class not found error in my script.
i HAVE imported java.math.* previously at the start of the code.
What are the probable causes of method - class not found? I am on 1.6 by the way.
Are you confusing
class java.lang.Math with
package java.math? Note that, like class String, class Math is in package java.lang, which is automatically imported, so there is no need to import anything explicitly.
As for nextUp, are you sure you want to use it? The nextUp of 3.1 is something like 3.10000000000000001.
And do you want to use round? The round of 3.14 is 3 not 4 -- I thought you didn't want to get a smaller number as a result.