mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Add Float/Double.isFinite
This commit is contained in:
parent
8c35ef0189
commit
b74c501fa6
|
@ -233,6 +233,10 @@ public class TDouble extends TNumber implements TComparable<TDouble> {
|
||||||
@Import(module = "teavm", name = "isinf")
|
@Import(module = "teavm", name = "isinf")
|
||||||
public static native boolean isInfinite(double v);
|
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) {
|
public static long doubleToRawLongBits(double value) {
|
||||||
return doubleToLongBits(value);
|
return doubleToLongBits(value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,6 +97,10 @@ public class TFloat extends TNumber implements TComparable<TFloat> {
|
||||||
@Import(module = "teavm", name = "isinf")
|
@Import(module = "teavm", name = "isinf")
|
||||||
public static native boolean isInfinite(float v);
|
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;")
|
@JSBody(script = "return NaN;")
|
||||||
@Import(module = "teavm", name = "TeaVM_getNaN")
|
@Import(module = "teavm", name = "TeaVM_getNaN")
|
||||||
private static native float getNaN();
|
private static native float getNaN();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user