BinaryInteger

extension BinaryInteger
  • Returns self rounded up to the nearest multiple of n.

    Precondition

    n is nonzero and |n| is representable as Self.

    Declaration

    Swift

    public func rounded(upToNearestMultipleOf n: Self) -> Self
  • The factorial of self.

    Requires

    self is greater than or equal to zero.

    Declaration

    Swift

    public var factorial: Self { get }
  • Undocumented

    Declaration

    Swift

    func f(_ n: Self, _ a: Self) -> Self