numbers in scarpet better handle long type values.
If possible, numbers that can be represented as longs (seeds, etc) will be handled as longs but they will loose their longinness with a single arithmetic operation.
This commit is contained in:
1 parent
bc9f3e89e0
commit
968ef0cd9f
8 files changed
+87
-24
No files matched your search
@@ -161,7 +161,7 @@ public abstract class Value implements Comparable<Value>, Cloneable
|
||||
return new StringValue(value.substring((int)from, (int)to));
|
||||
return new StringValue(value.substring((int)from));
|
||||
}
|
||||
public double readNumber()
|
||||
public double readDoubleNumber()
|
||||
{
|
||||
String s = getString();
|
||||
try
|
||||
@@ -176,7 +176,7 @@ public abstract class Value implements Comparable<Value>, Cloneable
|
||||
|
||||
public long readInteger()
|
||||
{
|
||||
return (long)readNumber();
|
||||
return (long) readDoubleNumber();
|
||||
}
|
||||
|
||||
public String getTypeString()
|
||||
|
||||
Reference in new issue
Block a user