diff options
-rw-r--r-- | sources/scala/runtime/compat/Math.scala | 18 | ||||
-rw-r--r-- | sources/scala/runtime/compat/Platform.scala | 3 |
2 files changed, 19 insertions, 2 deletions
diff --git a/sources/scala/runtime/compat/Math.scala b/sources/scala/runtime/compat/Math.scala index c543a170a6..ea83e7b6f1 100644 --- a/sources/scala/runtime/compat/Math.scala +++ b/sources/scala/runtime/compat/Math.scala @@ -12,9 +12,23 @@ package scala.runtime.compat; object Math { - val MAX_INT = java.lang.Integer.MAX_VALUE; - val MIN_INT = java.lang.Integer.MIN_VALUE; + val MIN_BYTE = java.lang.Byte.MIN_VALUE; + val MAX_BYTE = java.lang.Byte.MAX_VALUE; + val MIN_SHORT = java.lang.Short.MIN_VALUE; + val MAX_SHORT = java.lang.Short.MAX_VALUE; + val MIN_CHAR = java.lang.Character.MIN_VALUE; + val MAX_CHAR = java.lang.Character.MAX_VALUE; + val MIN_INT = java.lang.Integer.MIN_VALUE; + val MAX_INT = java.lang.Integer.MAX_VALUE; + val MIN_LONG = java.lang.Long.MIN_VALUE; + val MAX_LONG = java.lang.Long.MAX_VALUE; + val MIN_FLOAT = java.lang.Float.MIN_VALUE; + val MAX_FLOAT = java.lang.Float.MIN_VALUE; + val MIN_DOUBLE = java.lang.Double.MIN_VALUE; + val MAX_DOUBLE = java.lang.Double.MAX_VALUE; + def ceil(x: Double): Double = java.lang.Math.ceil(x); + def floor(x: Double): Double = java.lang.Math.floor(x); def log(x: Double): Double = java.lang.Math.log(x); def max(x: Int, y: Int): Int = java.lang.Math.max(x, y); def sqrt(x: Double): Double = java.lang.Math.sqrt(x); diff --git a/sources/scala/runtime/compat/Platform.scala b/sources/scala/runtime/compat/Platform.scala index 5ef3f8ecd5..282421a981 100644 --- a/sources/scala/runtime/compat/Platform.scala +++ b/sources/scala/runtime/compat/Platform.scala @@ -21,6 +21,9 @@ object Platform { def split(str: String, separator: Char): Array[String] = { str.split(separator.toString()); } + + def currentThread = java.lang.Thread.currentThread(); + def parseByte(s: String): Byte = java.lang.Byte.parseByte(s); def parseShort(s: String): Short = java.lang.Short.parseShort(s); def parseInt(s: String): Int = java.lang.Integer.parseInt(s); |