Packages

c

scala.runtime

RichFloat

final class RichFloat extends AnyVal with FractionalProxy[Float]

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RichFloat
  2. FractionalProxy
  3. RangedProxy
  4. ScalaNumberProxy
  5. OrderedProxy
  6. Ordered
  7. Comparable
  8. Typed
  9. Proxy
  10. ScalaNumericAnyConversions
  11. AnyVal
  12. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RichFloat(self: Float)

Type Members

  1. type ResultWithoutStep = Partial[Float, NumericRange[Float]]

    In order to supply predictable ranges, we require an Integral[T] which provides us with discrete operations on the (otherwise fractional) T.

    In order to supply predictable ranges, we require an Integral[T] which provides us with discrete operations on the (otherwise fractional) T. See Numeric.DoubleAsIfIntegral for an example.

    Definition Classes
    FractionalProxyRangedProxy

Value Members

  1. def <(that: Float): Boolean

    Returns true if this is less than that

    Returns true if this is less than that

    Definition Classes
    Ordered
  2. def <=(that: Float): Boolean

    Returns true if this is less than or equal to that.

    Returns true if this is less than or equal to that.

    Definition Classes
    Ordered
  3. def >(that: Float): Boolean

    Returns true if this is greater than that.

    Returns true if this is greater than that.

    Definition Classes
    Ordered
  4. def >=(that: Float): Boolean

    Returns true if this is greater than or equal to that.

    Returns true if this is greater than or equal to that.

    Definition Classes
    Ordered
  5. def abs: Float

    Returns the absolute value of this.

    Returns the absolute value of this.

    Definition Classes
    RichFloatScalaNumberProxy
  6. def byteValue(): Byte
  7. def ceil: Float
  8. def compare(y: Float): Int

    Result of comparing this with operand that.

    Result of comparing this with operand that.

    Implement this method to determine how instances of A will be sorted.

    Returns x where:

    • x < 0 when this < that
    • x == 0 when this == that
    • x > 0 when this > that
    Definition Classes
    OrderedProxyOrdered
  9. def compareTo(that: Float): Int

    Result of comparing this with operand that.

    Result of comparing this with operand that.

    Definition Classes
    Ordered → Comparable
  10. def doubleValue(): Double
  11. def floatValue(): Float
  12. def floor: Float
  13. def getClass(): Class[_ <: AnyVal]

    Returns the runtime class representation of the object.

    Returns the runtime class representation of the object.

    returns

    a class object corresponding to the runtime type of the receiver.

    Definition Classes
    AnyValAny
  14. def intValue(): Int
  15. def isInfinity: Boolean
  16. def isNaN: Boolean
  17. def isNegInfinity: Boolean
  18. def isPosInfinity: Boolean
  19. def isValidByte: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

    Definition Classes
    RichFloatScalaNumericAnyConversions
  20. def isValidChar: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

    Definition Classes
    RichFloatScalaNumericAnyConversions
  21. def isValidInt: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

    Definition Classes
    RichFloatScalaNumericAnyConversions
  22. def isValidShort: Boolean

    Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

    Returns true iff this has a zero fractional part, and is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

    Definition Classes
    RichFloatScalaNumericAnyConversions
  23. def isWhole(): Boolean

    returns

    true if this number has no decimal component, false otherwise.

    Definition Classes
    RichFloatFractionalProxyScalaNumericAnyConversions
  24. def longValue(): Long
  25. def max(that: Float): Float

    Returns this if this > that or that otherwise.

    Returns this if this > that or that otherwise.

    Definition Classes
    RichFloatScalaNumberProxy
  26. def min(that: Float): Float

    Returns this if this < that or that otherwise.

    Returns this if this < that or that otherwise.

    Definition Classes
    RichFloatScalaNumberProxy
  27. def round: Int
  28. val self: Float
    Definition Classes
    RichFloatTypedProxy
  29. def shortValue(): Short
  30. def signum: Int

    Returns the signum of this.

    Returns the signum of this.

    Definition Classes
    RichFloatScalaNumberProxy
  31. def toByte: Byte

    Returns the value of this as a scala.Byte.

    Returns the value of this as a scala.Byte. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  32. def toChar: Char

    Returns the value of this as a scala.Char.

    Returns the value of this as a scala.Char. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  33. def toDegrees: Float

    Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

    Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

    returns

    the measurement of the angle x in degrees.

  34. def toDouble: Double

    Returns the value of this as a scala.Double.

    Returns the value of this as a scala.Double. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  35. def toFloat: Float

    Returns the value of this as a scala.Float.

    Returns the value of this as a scala.Float. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  36. def toInt: Int

    Returns the value of this as an scala.Int.

    Returns the value of this as an scala.Int. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  37. def toLong: Long

    Returns the value of this as a scala.Long.

    Returns the value of this as a scala.Long. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  38. def toRadians: Float

    Converts an angle measured in degrees to an approximately equivalent angle measured in radians.

    Converts an angle measured in degrees to an approximately equivalent angle measured in radians.

    returns

    the measurement of the angle x in radians.

  39. def toShort: Short

    Returns the value of this as a scala.Short.

    Returns the value of this as a scala.Short. This may involve rounding or truncation.

    Definition Classes
    ScalaNumericAnyConversions
  40. def toString(): String

    Returns a string representation of the object.

    Returns a string representation of the object.

    The default representation is platform dependent.

    returns

    a string representation of the object.

    Definition Classes
    ProxyAny
  41. def underlying(): AnyRef

Deprecated Value Members

  1. def to(end: Float, step: Float): Inclusive[Float]
    Definition Classes
    FractionalProxyRangedProxy
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.6) use BigDecimal range instead

  2. def to(end: Float): ResultWithoutStep
    Definition Classes
    FractionalProxyRangedProxy
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.6) use BigDecimal range instead

  3. def until(end: Float, step: Float): Exclusive[Float]
    Definition Classes
    FractionalProxyRangedProxy
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.6) use BigDecimal range instead

  4. def until(end: Float): ResultWithoutStep
    Definition Classes
    FractionalProxyRangedProxy
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.6) use BigDecimal range instead