FloatingPoint

protocol FloatingPoint : Comparable, AbsoluteValuable, SignedNumber, Strideable
  • Returns the value rounded to an integral value using the specified rounding rule.

    Mutating variant

    round

    Declaration

    Swift

    public func rounded(_ rule: FloatingPointRoundingRule) -> Self

    Parameters

    rule

    The rounding rule follow.