Scala Library: scala.Float
scala.Float
Float
, a 32-bit IEEE-754 floating point number (equivalent to Java’s
float
primitive type) is a subtype of scala.AnyVal. Instances of Float
are
not represented by an object in the underlying runtime system.
There is an implicit conversion from scala.Float => scala.runtime.RichFloat which provides useful non-primitive operations.
Abstract Value Members From scala.Float
abstract def !=(x: Byte): Boolean
Returns true
if this value is not equal to x, false
otherwise.
(defined at scala.Float)
abstract def !=(x: Char): Boolean
Returns true
if this value is not equal to x, false
otherwise.
(defined at scala.Float)
abstract def !=(x: Double): Boolean
Returns true
if this value is not equal to x, false
otherwise.
(defined at scala.Float)
abstract def !=(x: Float): Boolean
Returns true
if this value is not equal to x, false
otherwise.
(defined at scala.Float)
abstract def !=(x: Int): Boolean
Returns true
if this value is not equal to x, false
otherwise.
(defined at scala.Float)
abstract def !=(x: Long): Boolean
Returns true
if this value is not equal to x, false
otherwise.
(defined at scala.Float)
abstract def !=(x: Short): Boolean
Returns true
if this value is not equal to x, false
otherwise.
(defined at scala.Float)
abstract def %(x: Byte): Float
Returns the remainder of the division of this value by x
.
(defined at scala.Float)
abstract def %(x: Char): Float
Returns the remainder of the division of this value by x
.
(defined at scala.Float)
abstract def %(x: Double): Double
Returns the remainder of the division of this value by x
.
(defined at scala.Float)
abstract def %(x: Float): Float
Returns the remainder of the division of this value by x
.
(defined at scala.Float)
abstract def %(x: Int): Float
Returns the remainder of the division of this value by x
.
(defined at scala.Float)
abstract def %(x: Long): Float
Returns the remainder of the division of this value by x
.
(defined at scala.Float)
abstract def %(x: Short): Float
Returns the remainder of the division of this value by x
.
(defined at scala.Float)
abstract def *(x: Byte): Float
Returns the product of this value and x
.
(defined at scala.Float)
abstract def *(x: Char): Float
Returns the product of this value and x
.
(defined at scala.Float)
abstract def *(x: Double): Double
Returns the product of this value and x
.
(defined at scala.Float)
abstract def *(x: Float): Float
Returns the product of this value and x
.
(defined at scala.Float)
abstract def *(x: Int): Float
Returns the product of this value and x
.
(defined at scala.Float)
abstract def *(x: Long): Float
Returns the product of this value and x
.
(defined at scala.Float)
abstract def *(x: Short): Float
Returns the product of this value and x
.
(defined at scala.Float)
abstract def +(x: Byte): Float
Returns the sum of this value and x
.
(defined at scala.Float)
abstract def +(x: Char): Float
Returns the sum of this value and x
.
(defined at scala.Float)
abstract def +(x: Double): Double
Returns the sum of this value and x
.
(defined at scala.Float)
abstract def +(x: Float): Float
Returns the sum of this value and x
.
(defined at scala.Float)
abstract def +(x: Int): Float
Returns the sum of this value and x
.
(defined at scala.Float)
abstract def +(x: Long): Float
Returns the sum of this value and x
.
(defined at scala.Float)
abstract def +(x: Short): Float
Returns the sum of this value and x
.
(defined at scala.Float)
abstract def +(x: String): String
(defined at scala.Float)
abstract def -(x: Byte): Float
Returns the difference of this value and x
.
(defined at scala.Float)
abstract def -(x: Char): Float
Returns the difference of this value and x
.
(defined at scala.Float)
abstract def -(x: Double): Double
Returns the difference of this value and x
.
(defined at scala.Float)
abstract def -(x: Float): Float
Returns the difference of this value and x
.
(defined at scala.Float)
abstract def -(x: Int): Float
Returns the difference of this value and x
.
(defined at scala.Float)
abstract def -(x: Long): Float
Returns the difference of this value and x
.
(defined at scala.Float)
abstract def -(x: Short): Float
Returns the difference of this value and x
.
(defined at scala.Float)
abstract def /(x: Byte): Float
Returns the quotient of this value and x
.
(defined at scala.Float)
abstract def /(x: Char): Float
Returns the quotient of this value and x
.
(defined at scala.Float)
abstract def /(x: Double): Double
Returns the quotient of this value and x
.
(defined at scala.Float)
abstract def /(x: Float): Float
Returns the quotient of this value and x
.
(defined at scala.Float)
abstract def /(x: Int): Float
Returns the quotient of this value and x
.
(defined at scala.Float)
abstract def /(x: Long): Float
Returns the quotient of this value and x
.
(defined at scala.Float)
abstract def /(x: Short): Float
Returns the quotient of this value and x
.
(defined at scala.Float)
abstract def <(x: Byte): Boolean
Returns true
if this value is less than x, false
otherwise.
(defined at scala.Float)
abstract def <(x: Char): Boolean
Returns true
if this value is less than x, false
otherwise.
(defined at scala.Float)
abstract def <(x: Double): Boolean
Returns true
if this value is less than x, false
otherwise.
(defined at scala.Float)
abstract def <(x: Float): Boolean
Returns true
if this value is less than x, false
otherwise.
(defined at scala.Float)
abstract def <(x: Int): Boolean
Returns true
if this value is less than x, false
otherwise.
(defined at scala.Float)
abstract def <(x: Long): Boolean
Returns true
if this value is less than x, false
otherwise.
(defined at scala.Float)
abstract def <(x: Short): Boolean
Returns true
if this value is less than x, false
otherwise.
(defined at scala.Float)
abstract def <=(x: Byte): Boolean
Returns true
if this value is less than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def <=(x: Char): Boolean
Returns true
if this value is less than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def <=(x: Double): Boolean
Returns true
if this value is less than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def <=(x: Float): Boolean
Returns true
if this value is less than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def <=(x: Int): Boolean
Returns true
if this value is less than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def <=(x: Long): Boolean
Returns true
if this value is less than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def <=(x: Short): Boolean
Returns true
if this value is less than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def ==(x: Byte): Boolean
Returns true
if this value is equal to x, false
otherwise.
(defined at scala.Float)
abstract def ==(x: Char): Boolean
Returns true
if this value is equal to x, false
otherwise.
(defined at scala.Float)
abstract def ==(x: Double): Boolean
Returns true
if this value is equal to x, false
otherwise.
(defined at scala.Float)
abstract def ==(x: Float): Boolean
Returns true
if this value is equal to x, false
otherwise.
(defined at scala.Float)
abstract def ==(x: Int): Boolean
Returns true
if this value is equal to x, false
otherwise.
(defined at scala.Float)
abstract def ==(x: Long): Boolean
Returns true
if this value is equal to x, false
otherwise.
(defined at scala.Float)
abstract def ==(x: Short): Boolean
Returns true
if this value is equal to x, false
otherwise.
(defined at scala.Float)
abstract def >(x: Byte): Boolean
Returns true
if this value is greater than x, false
otherwise.
(defined at scala.Float)
abstract def >(x: Char): Boolean
Returns true
if this value is greater than x, false
otherwise.
(defined at scala.Float)
abstract def >(x: Double): Boolean
Returns true
if this value is greater than x, false
otherwise.
(defined at scala.Float)
abstract def >(x: Float): Boolean
Returns true
if this value is greater than x, false
otherwise.
(defined at scala.Float)
abstract def >(x: Int): Boolean
Returns true
if this value is greater than x, false
otherwise.
(defined at scala.Float)
abstract def >(x: Long): Boolean
Returns true
if this value is greater than x, false
otherwise.
(defined at scala.Float)
abstract def >(x: Short): Boolean
Returns true
if this value is greater than x, false
otherwise.
(defined at scala.Float)
abstract def >=(x: Byte): Boolean
Returns true
if this value is greater than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def >=(x: Char): Boolean
Returns true
if this value is greater than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def >=(x: Double): Boolean
Returns true
if this value is greater than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def >=(x: Float): Boolean
Returns true
if this value is greater than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def >=(x: Int): Boolean
Returns true
if this value is greater than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def >=(x: Long): Boolean
Returns true
if this value is greater than or equal to x, false
otherwise.
(defined at scala.Float)
abstract def >=(x: Short): Boolean
Returns true
if this value is greater than or equal to x, false
otherwise.
(defined at scala.Float)
Concrete Value Members From scala.Float
abstract def toByte: Byte
(defined at scala.Float)
Concrete Value Members From Implicit scala.LowPriorityImplicits.floatWrapper
def compare(y: Float): Int
Result of comparing this
with operand that
.
Implement this method to determine how instances of A will be sorted.
Returns x
where:
x < 0
whenthis < that
x == 0
whenthis == that
-
x > 0
whenthis > that
- Implicit information
- This member is added by an implicit conversion from Float to RichFloat performed by method floatWrapper in scala.LowPriorityImplicits.
- Definition Classes
- OrderedProxy → Ordered
(added by implicit convertion: scala.LowPriorityImplicits.floatWrapper)
def compareTo(that: Float): Int
Result of comparing this
with operand that
.
- Implicit information
- This member is added by an implicit conversion from Float to RichFloat performed by method floatWrapper in scala.LowPriorityImplicits.
- Definition Classes
- Ordered → Comparable
(added by implicit convertion: scala.LowPriorityImplicits.floatWrapper)
def max(that: Float): Float
Returns this
if this > that
or that
otherwise.
- Implicit information
- This member is added by an implicit conversion from Float to RichFloat performed by method floatWrapper in scala.LowPriorityImplicits.
- Definition Classes
- RichFloat → ScalaNumberProxy
(added by implicit convertion: scala.LowPriorityImplicits.floatWrapper)
def min(that: Float): Float
Returns this
if this < that
or that
otherwise.
- Implicit information
- This member is added by an implicit conversion from Float to RichFloat performed by method floatWrapper in scala.LowPriorityImplicits.
- Definition Classes
- RichFloat → ScalaNumberProxy
(added by implicit convertion: scala.LowPriorityImplicits.floatWrapper)
def to(end: Float): Partial[Float, NumericRange[Float]]
- Implicit information
- This member is added by an implicit conversion from Float to RichFloat performed by method floatWrapper in scala.LowPriorityImplicits.
- Definition Classes
- FractionalProxy → RangedProxy
(added by implicit convertion: scala.LowPriorityImplicits.floatWrapper)
def to(end: Float, step: Float): Inclusive[Float]
- Implicit information
- This member is added by an implicit conversion from Float to RichFloat performed by method floatWrapper in scala.LowPriorityImplicits.
- Definition Classes
- FractionalProxy → RangedProxy
(added by implicit convertion: scala.LowPriorityImplicits.floatWrapper)
def until(end: Float): Partial[Float, NumericRange[Float]]
- Implicit information
- This member is added by an implicit conversion from Float to RichFloat performed by method floatWrapper in scala.LowPriorityImplicits.
- Definition Classes
- FractionalProxy → RangedProxy
(added by implicit convertion: scala.LowPriorityImplicits.floatWrapper)
def until(end: Float, step: Float): Exclusive[Float]
- Implicit information
- This member is added by an implicit conversion from Float to RichFloat performed by method floatWrapper in scala.LowPriorityImplicits.
- Definition Classes
- FractionalProxy → RangedProxy
(added by implicit convertion: scala.LowPriorityImplicits.floatWrapper)
Concrete Value Members From Implicit scala.Predef.float2Float
def compareTo(arg0: java.lang.Float): Int
- Implicit information
- This member is added by an implicit conversion from Float to java.lang.Float performed by method float2Float in scala.Predef.
- Definition Classes
- Float → Comparable (added by implicit convertion: scala.Predef.float2Float)
Full Source:
Interested in Scala?
I send out weekly, personalized emails with articles and conference talks.
Subscribe now.