NumΒΆ
Combination of Arith, Bits, and Order type classes
Abstract Methods
trait Num[T] extends Arith[T] with Bits[T] with Order[T] | |
---|---|
def fromInt(x: scala.Int, force: Boolean = true): T
Returns the closest representable value of type T to x.
If force is true, gives a warning when the conversion is not exact.
|
|
def fromLong(x: scala.Long, force: Boolean = true): T
Returns the closest representable value of type T to x.
If force is true, gives a warning when the conversion is not exact.
|
|
def fromFloat(x: scala.Float, force: Boolean = true): T
Returns the closest representable value of type T to x.
If force is true, gives a warning when the conversion is not exact.
|
|
def fromDouble(x: scala.Double, force: Boolean = true): T
Returns the closest representable value of type T to x.
If force is true, gives a warning when the conversion is not exact.
|
|
def maxValue: T
Returns the largest, finite, positive value representable by type T.
|
|
def minValue: T
Returns the most negative, finite value representable by type T.
|
|
def minPositiveValue: T
Returns the smallest positive (nonzero) value representable by type T.
|