Add the following dependency to pomxml. 31 becomes 4 and -11 becomes -1. Because ceil is a static method of Math you always use it as Mathceil rather than as a method of a Math object you created Math is not a constructor.
To get the result with two decimals you can do like this.
Because ceil is a static method of Math you always use it as Mathceil rather than as a method of a Math object you created Math is not a constructor. In the example below I also will provide a JavaScript alternative to PHPs number_format function. Function roundToTwo num return Mathround num e2 e-2. A fix suggested by minitech.