For compatibility wrap numbers always as Double instances.
git-svn-id: svn://10.0.0.236/trunk@163845 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4f589b3f7c
commit
b2231892bb
@ -223,16 +223,6 @@ public class ScriptRuntime {
|
||||
|
||||
public static Number wrapNumber(double x)
|
||||
{
|
||||
int i = (int)x;
|
||||
if ((double)i == x) {
|
||||
if (i == 0) {
|
||||
if (1.0 / x < 0) {
|
||||
// x is -0.0
|
||||
return new Double(x);
|
||||
}
|
||||
}
|
||||
return wrapInt(i);
|
||||
}
|
||||
if (x != x) {
|
||||
return ScriptRuntime.NaNobj;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user