1.1 --- a/emul/mini/src/main/java/java/lang/Math.java Fri Feb 01 16:00:27 2013 +0100
1.2 +++ b/emul/mini/src/main/java/java/lang/Math.java Tue Feb 26 14:55:55 2013 +0100
1.3 @@ -643,9 +643,8 @@
1.4 * @see java.lang.Integer#MAX_VALUE
1.5 * @see java.lang.Integer#MIN_VALUE
1.6 */
1.7 - @JavaScriptBody(args="a", body="return Math.round(a);")
1.8 public static int round(float a) {
1.9 - throw new UnsupportedOperationException();
1.10 + return (int)roundDbl(a);
1.11 }
1.12
1.13 /**
1.14 @@ -668,10 +667,12 @@
1.15 * @see java.lang.Long#MAX_VALUE
1.16 * @see java.lang.Long#MIN_VALUE
1.17 */
1.18 + public static long round(double a) {
1.19 + return (long)roundDbl(a);
1.20 + }
1.21 +
1.22 @JavaScriptBody(args="a", body="return Math.round(a);")
1.23 - public static long round(double a) {
1.24 - throw new UnsupportedOperationException();
1.25 - }
1.26 + private static native double roundDbl(double d);
1.27
1.28 // private static Random randomNumberGenerator;
1.29 //