Packages

implicit object FloatIsFractional extends FloatIsFractional with IeeeOrdering

Source
Numeric.scala
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FloatIsFractional
  2. IeeeOrdering
  3. FloatIsFractional
  4. Fractional
  5. Numeric
  6. Ordering
  7. PartialOrdering
  8. Equiv
  9. Serializable
  10. Comparator
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class FractionalOps extends NumericOps
    Definition Classes
    Fractional
  2. class NumericOps extends AnyRef
    Definition Classes
    Numeric
  3. class OrderingOps extends AnyRef

    This inner class defines comparison operators available for T.

    This inner class defines comparison operators available for T.

    It can't extend AnyVal because it is not a top-level class or a member of a statically accessible object.

    Definition Classes
    Ordering

Value Members

  1. def abs(x: Float): Float
    Definition Classes
    FloatIsFractionalNumeric
  2. def compare(x: Float, y: Float): Int

    Returns an integer whose sign communicates how x compares to y.

    Returns an integer whose sign communicates how x compares to y.

    The result sign has the following meaning:

    • negative if x < y
    • positive if x > y
    • zero otherwise (if x == y)
    Definition Classes
    IeeeOrderingOrdering → Comparator
  3. def div(x: Float, y: Float): Float
    Definition Classes
    FloatIsFractionalFractional
  4. def equiv(x: Float, y: Float): Boolean

    Return true if x == y in the ordering.

    Return true if x == y in the ordering.

    Definition Classes
    IeeeOrderingOrderingPartialOrderingEquiv
  5. def fromInt(x: Int): Float
    Definition Classes
    FloatIsFractionalNumeric
  6. def gt(x: Float, y: Float): Boolean

    Return true if x > y in the ordering.

    Return true if x > y in the ordering.

    Definition Classes
    IeeeOrderingOrderingPartialOrdering
  7. def gteq(x: Float, y: Float): Boolean

    Return true if x >= y in the ordering.

    Return true if x >= y in the ordering.

    Definition Classes
    IeeeOrderingOrderingPartialOrdering
  8. def isReverseOf(other: Ordering[_]): Boolean

    Returns whether or not the other ordering is the opposite ordering of this one.

    Returns whether or not the other ordering is the opposite ordering of this one.

    Equivalent to other == this.reverse.

    Implementations should only override this method if they are overriding reverse as well.

    Definition Classes
    Ordering
  9. def lt(x: Float, y: Float): Boolean

    Return true if x < y in the ordering.

    Return true if x < y in the ordering.

    Definition Classes
    IeeeOrderingOrderingPartialOrdering
  10. def lteq(x: Float, y: Float): Boolean

    Return true if x <= y in the ordering.

    Return true if x <= y in the ordering.

    Definition Classes
    IeeeOrderingOrderingPartialOrdering
  11. def max[U <: Float](x: U, y: U): U

    Return x if x >= y, otherwise y.

    Return x if x >= y, otherwise y.

    Definition Classes
    IeeeOrderingOrdering
  12. def min[U <: Float](x: U, y: U): U

    Return x if x <= y, otherwise y.

    Return x if x <= y, otherwise y.

    Definition Classes
    IeeeOrderingOrdering
  13. def minus(x: Float, y: Float): Float
    Definition Classes
    FloatIsFractionalNumeric
  14. implicit def mkNumericOps(lhs: Float): FractionalOps
    Definition Classes
    FractionalNumeric
  15. implicit def mkOrderingOps(lhs: Float): OrderingOps

    This implicit method augments T with the comparison operators defined in scala.math.Ordering.Ops.

    This implicit method augments T with the comparison operators defined in scala.math.Ordering.Ops.

    Definition Classes
    Ordering
  16. def negate(x: Float): Float
    Definition Classes
    FloatIsFractionalNumeric
  17. def on[U](f: (U) => Float): Ordering[U]

    Given f, a function from U into T, creates an Ordering[U] whose compare function is equivalent to:

    Given f, a function from U into T, creates an Ordering[U] whose compare function is equivalent to:

    def compare(x:U, y:U) = Ordering[T].compare(f(x), f(y))
    Definition Classes
    Ordering
  18. def one: Float
    Definition Classes
    Numeric
  19. def orElse(other: Ordering[Float]): Ordering[Float]

    Creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else the result of others compare function.

    Creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else the result of others compare function.

    other

    an Ordering to use if this Ordering returns zero

    Definition Classes
    Ordering
    Example:
    1. case class Pair(a: Int, b: Int)
      
      val pairOrdering = Ordering.by[Pair, Int](_.a)
                                 .orElse(Ordering.by[Pair, Int](_.b))
  20. def orElseBy[S](f: (Float) => S)(implicit ord: Ordering[S]): Ordering[Float]

    Given f, a function from T into S, creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else a result equivalent to:

    Given f, a function from T into S, creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else a result equivalent to:

    Ordering[S].compare(f(x), f(y))

    This function is equivalent to passing the result of Ordering.by(f) to orElse.

    Definition Classes
    Ordering
    Example:
    1. case class Pair(a: Int, b: Int)
      
      val pairOrdering = Ordering.by[Pair, Int](_.a)
                                 .orElseBy[Int](_.b)
  21. def parseString(str: String): Option[Float]
    Definition Classes
    FloatIsFractionalNumeric
  22. def plus(x: Float, y: Float): Float
    Definition Classes
    FloatIsFractionalNumeric
  23. def reverse: Ordering[Float]

    Return the opposite ordering of this one.

    Return the opposite ordering of this one.

    Implementations overriding this method MUST override isReverseOf as well if they change the behavior at all (for example, caching does not require overriding it).

    Definition Classes
    OrderingPartialOrdering
  24. def reversed(): Comparator[Float]
    Definition Classes
    Comparator
  25. def sign(x: Float): Float
    Definition Classes
    FloatIsFractionalNumeric
  26. def thenComparing[U <: Comparable[_ >: U <: AnyRef]](arg0: java.util.function.Function[_ >: Float <: AnyRef, _ <: U]): Comparator[Float]
    Definition Classes
    Comparator
  27. def thenComparing[U <: AnyRef](arg0: java.util.function.Function[_ >: Float <: AnyRef, _ <: U], arg1: Comparator[_ >: U <: AnyRef]): Comparator[Float]
    Definition Classes
    Comparator
  28. def thenComparing(arg0: Comparator[_ >: Float <: AnyRef]): Comparator[Float]
    Definition Classes
    Comparator
  29. def thenComparingDouble(arg0: ToDoubleFunction[_ >: Float <: AnyRef]): Comparator[Float]
    Definition Classes
    Comparator
  30. def thenComparingInt(arg0: ToIntFunction[_ >: Float <: AnyRef]): Comparator[Float]
    Definition Classes
    Comparator
  31. def thenComparingLong(arg0: ToLongFunction[_ >: Float <: AnyRef]): Comparator[Float]
    Definition Classes
    Comparator
  32. def times(x: Float, y: Float): Float
    Definition Classes
    FloatIsFractionalNumeric
  33. def toDouble(x: Float): Double
    Definition Classes
    FloatIsFractionalNumeric
  34. def toFloat(x: Float): Float
    Definition Classes
    FloatIsFractionalNumeric
  35. def toInt(x: Float): Int
    Definition Classes
    FloatIsFractionalNumeric
  36. def toLong(x: Float): Long
    Definition Classes
    FloatIsFractionalNumeric
  37. def tryCompare(x: Float, y: Float): Some[Int]

    Returns whether a comparison between x and y is defined, and if so the result of compare(x, y).

    Returns whether a comparison between x and y is defined, and if so the result of compare(x, y).

    Definition Classes
    OrderingPartialOrdering
  38. def zero: Float
    Definition Classes
    Numeric

Deprecated Value Members

  1. def signum(x: Float): Int
    Definition Classes
    Numeric
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) use sign method instead