diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/TDouble.java b/classlib/src/main/java/org/teavm/classlib/java/lang/TDouble.java index acdc85d15..cdd076127 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/TDouble.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/TDouble.java @@ -233,6 +233,10 @@ public class TDouble extends TNumber implements TComparable { @Import(module = "teavm", name = "isinf") public static native boolean isInfinite(double v); + @JSBody(params = "v", script = "return isFinite(v);") + @Import(module = "teavm", name = "isfinite") + public static native boolean isFinite(double v); + public static long doubleToRawLongBits(double value) { return doubleToLongBits(value); } diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/TFloat.java b/classlib/src/main/java/org/teavm/classlib/java/lang/TFloat.java index 4b2d23cc2..af2db912a 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/TFloat.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/TFloat.java @@ -97,6 +97,10 @@ public class TFloat extends TNumber implements TComparable { @Import(module = "teavm", name = "isinf") public static native boolean isInfinite(float v); + @JSBody(params = "v", script = "return isFinite(v);") + @Import(module = "teavm", name = "isfinite") + public static native boolean isFinite(float v); + @JSBody(script = "return NaN;") @Import(module = "teavm", name = "TeaVM_getNaN") private static native float getNaN();