summaryrefslogtreecommitdiff
path: root/src/library/scala/Float.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-03-15 04:02:35 +0000
committerPaul Phillips <paulp@improving.org>2011-03-15 04:02:35 +0000
commit4383277103b8bc78244aff05d5116b07e70f2c2a (patch)
treecc3c66dd4dd1da779fb624478bce56bc125a6aaf /src/library/scala/Float.scala
parente96dba0c9a2467c6cf396c70a48ef0750503c26e (diff)
downloadscala-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/Float.scala')
-rw-r--r--src/library/scala/Float.scala17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/library/scala/Float.scala b/src/library/scala/Float.scala
index 81b464078d..39e510e477 100644
--- a/src/library/scala/Float.scala
+++ b/src/library/scala/Float.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 Float extends AnyVal {
object Float extends AnyValCompanion {
+ /** The smallest positive value greater than 0.0f.*/
final val MinPositiveValue = jl.Float.MIN_VALUE
- final val MinNegativeValue = -jl.Float.MAX_VALUE
final val NaN = jl.Float.NaN
final val PositiveInfinity = jl.Float.POSITIVE_INFINITY
final val NegativeInfinity = jl.Float.NEGATIVE_INFINITY
@deprecated("use Float.MinPositiveValue instead")
- final val Epsilon = MinPositiveValue
- @deprecated("use Float.MinNegativeValue instead")
- final val MinValue = MinNegativeValue
+ final val Epsilon = MinPositiveValue
+
+ /** The negative number with the greatest (finite) absolute value which is representable
+ * by a Float. Note that it differs from [[java.lang.Float.MIN_VALUE]], which
+ * is the smallest positive value representable by a Float. In Scala that number
+ * is called Float.MinPositiveValue.
+ */
+ final val MinValue = -jl.Float.MAX_VALUE
+
+ /** The largest finite positive number representable as a Float. */
final val MaxValue = jl.Float.MAX_VALUE
def box(x: Float): jl.Float = jl.Float.valueOf(x)