diff options
author | Paul Phillips <paulp@improving.org> | 2011-03-15 04:02:35 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-03-15 04:02:35 +0000 |
commit | 4383277103b8bc78244aff05d5116b07e70f2c2a (patch) | |
tree | cc3c66dd4dd1da779fb624478bce56bc125a6aaf /src/library/scala/Double.scala | |
parent | e96dba0c9a2467c6cf396c70a48ef0750503c26e (diff) | |
download | scala-4383277103b8bc78244aff05d5116b07e70f2c2a.tar.gz scala-4383277103b8bc78244aff05d5116b07e70f2c2a.tar.bz2 scala-4383277103b8bc78244aff05d5116b07e70f2c2a.zip |
Addresses the issues swirling around Double.Eps...
Addresses the issues swirling around Double.Epsilon and friends which
were battled out in more than one venue and then aptly summarized by
retronym in #3791. Thanks to Simon Ochsenreither for submitting a patch;
I wasn't able to use too much of it because the source code for these
types is generated, but effort is always appreciated. Closes #3791, and
I'm tired and I'd hate to blow this one at this late date: review by
rytz.
Diffstat (limited to 'src/library/scala/Double.scala')
-rw-r--r-- | src/library/scala/Double.scala | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/library/scala/Double.scala b/src/library/scala/Double.scala index cc4f597bda..fe37860c07 100644 --- a/src/library/scala/Double.scala +++ b/src/library/scala/Double.scala @@ -6,7 +6,7 @@ ** |/ ** \* */ -// generated on Sun Jan 23 21:13:38 PST 2011 +// DO NOT EDIT, CHANGES WILL BE LOST. package scala @@ -119,16 +119,23 @@ final class Double extends AnyVal { object Double extends AnyValCompanion { + /** The smallest positive value greater than 0.0d.*/ final val MinPositiveValue = jl.Double.MIN_VALUE - final val MinNegativeValue = -jl.Double.MAX_VALUE final val NaN = jl.Double.NaN final val PositiveInfinity = jl.Double.POSITIVE_INFINITY final val NegativeInfinity = jl.Double.NEGATIVE_INFINITY @deprecated("use Double.MinPositiveValue instead") - final val Epsilon = MinPositiveValue - @deprecated("use Double.MinNegativeValue instead") - final val MinValue = MinNegativeValue + final val Epsilon = MinPositiveValue + + /** The negative number with the greatest (finite) absolute value which is representable + * by a Double. Note that it differs from [[java.lang.Double.MIN_VALUE]], which + * is the smallest positive value representable by a Double. In Scala that number + * is called Double.MinPositiveValue. + */ + final val MinValue = -jl.Double.MAX_VALUE + + /** The largest finite positive number representable as a Double. */ final val MaxValue = jl.Double.MAX_VALUE def box(x: Double): jl.Double = jl.Double.valueOf(x) |