Other Functions

The following functions are available globally.

  • Approximation Operators - for when Swift gets double / float arithmetic wrong

    Declaration

    Swift

    public func ~== (left: Double, right: Double) -> Bool
  • Declaration

    Swift

    public func ~!= (left: Double, right: Double) -> Bool
  • Declaration

    Swift

    public func ~<= (left: Double, right: Double) -> Bool
  • Declaration

    Swift

    public func ~>= (left: Double, right: Double) -> Bool
  • Declaration

    Swift

    public func ~< (left: Double, right: Double) -> Bool
  • Declaration

    Swift

    public func ~> (left: Double, right: Double) -> Bool
  • Random double in range

    Declaration

    Swift

    public func random(in range: ClosedRange<Double>) -> Double

    Parameters

    in

    Range of randomization

  • Negative logic can be confusing, so we draw special attention to those cases

    Declaration

    Swift

    prefix public func ❗️ (a: Bool) -> Bool