For compatibility wrap numbers always as Double instances.

This commit is contained in:
igor%mir2.org 2004-10-15 20:41:01 +00:00
Родитель 952dd72170
Коммит 83c22ac592
1 изменённых файлов: 0 добавлений и 10 удалений

Просмотреть файл

@ -223,16 +223,6 @@ public class ScriptRuntime {
public static Number wrapNumber(double x) 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) { if (x != x) {
return ScriptRuntime.NaNobj; return ScriptRuntime.NaNobj;
} }