On this page
Object scala.Float
object Float
| Supertypes | |
|---|---|
| Self type |
Concrete methods
Source
Transform a value type into a boxed reference type.
Runtime implementation determined by scala.runtime.BoxesRunTime.boxToFloat. See src/library/scala/runtime/BoxesRunTime.java.
| Value parameters |
|
|---|---|
| Returns | a java.lang.Float offering |
Source
The String representation of the scala.Float companion object.
| Definition Classes | Any |
|---|
Source
Transform a boxed type into a value type. Note that this method is not typesafe: it accepts any Object, but will throw an exception if the argument is not a java.lang.Float.
Runtime implementation determined by scala.runtime.BoxesRunTime.unboxToFloat. See src/library/scala/runtime/BoxesRunTime.java.
| Value parameters |
|
|---|---|
| Returns | the Float resulting from calling floatValue() on |
| Throws |
|
Concrete fields
Source
final val MaxValue: 3.4028235E38f
The largest finite positive number representable as a Float.
Source
final val MinPositiveValue: 1.4E-45f
The smallest positive value greater than 0.0f which is representable as a Float.
Source
final val MinValue: -3.4028235E38f
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.
Source
final val NaN: NaNf
Source
final val NegativeInfinity: -Infinityf
Source
final val PositiveInfinity: Infinityf
Implicits
Source
© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.1.1/scala/Float$.html