diff options
author | mihaylov <mihaylov@epfl.ch> | 2005-10-04 16:15:01 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2005-10-04 16:15:01 +0000 |
commit | c9305ff74fc9e23d2a8f4c6a27a25e5562c048cc (patch) | |
tree | 759783168829fe3609bca18f4682572a1b2ac814 /sources/msil | |
parent | f13923cb2aea70b69f548a5c0fabd343809132b8 (diff) | |
download | scala-c9305ff74fc9e23d2a8f4c6a27a25e5562c048cc.tar.gz scala-c9305ff74fc9e23d2a8f4c6a27a25e5562c048cc.tar.bz2 scala-c9305ff74fc9e23d2a8f4c6a27a25e5562c048cc.zip |
*** empty log message ***
Diffstat (limited to 'sources/msil')
-rw-r--r-- | sources/msil/scala/runtime/compat/Math.scala | 36 | ||||
-rw-r--r-- | sources/msil/scala/runtime/compat/Platform.scala | 3 |
2 files changed, 39 insertions, 0 deletions
diff --git a/sources/msil/scala/runtime/compat/Math.scala b/sources/msil/scala/runtime/compat/Math.scala new file mode 100644 index 0000000000..5b9853e953 --- /dev/null +++ b/sources/msil/scala/runtime/compat/Math.scala @@ -0,0 +1,36 @@ +/* __ *\ +** ________ ___ / / ___ Scala API ** +** / __/ __// _ | / / / _ | (c) 2002-2005, LAMP/EPFL ** +** __\ \/ /__/ __ |/ /__/ __ | ** +** /____/\___/_/ |_/____/_/ | | ** +** |/ ** +\* */ + +// $Id$ + + +package scala.runtime.compat; + +object Math { + val MIN_BYTE = System.SByte.MinValue; + val MAX_BYTE = System.SByte.MaxValue; + val MIN_SHORT = System.Int16.MinValue; + val MAX_SHORT = System.Int16.MaxValue; + val MIN_CHAR = System.Char.MinValue; + val MAX_CHAR = System.Char.MaxValue; + val MIN_INT = System.Int32.MinValue; + val MAX_INT = System.Int32.MaxValue; + val MIN_LONG = System.Int64.MinValue; + val MAX_LONG = System.Int64.MaxValue; + val MIN_FLOAT = System.Single.MinValue; + val MAX_FLOAT = System.Single.MaxValue; + val MIN_DOUBLE = System.Double.MinValue; + val MAX_DOUBLE = System.Double.MaxValue; + + def max(x: Int, y: Int): Int = System.Math.Max(x, y); + + def ceil (x: Double): Double = System.Math.Ceiling(x); + def floor(x: Double): Double = System.Math.Floor(x); + def log (x: Double): Double = System.Math.Log(x); + def sqrt (x: Double): Double = System.Math.Sqrt(x); +} diff --git a/sources/msil/scala/runtime/compat/Platform.scala b/sources/msil/scala/runtime/compat/Platform.scala index d47b7f9297..fcdaa54e22 100644 --- a/sources/msil/scala/runtime/compat/Platform.scala +++ b/sources/msil/scala/runtime/compat/Platform.scala @@ -24,6 +24,9 @@ object Platform { sep(0) = separator; str.Split(sep); } + + def currentThread = System.Threading.Thread.CurrentThread; + def parseByte(s: String) : Byte = System.Byte.Parse(s); def parseShort(s: String) : Short = System.Int16.Parse(s); def parseInt(s: String) : Int = System.Int32.Parse(s); |