Math is not so much a class as some methods that are mathy. They are not class or instance methods, They’re all around you.

Method reference

  • public func clip<T: Comparable>(value: T, min minValue: T, max maxValue: T) -> T

  • public func interpolate(from fromValue: Double, to toValue: Double, at fraction: Double) -> Double

  • public func map(value: Double, #fromInterval: (Double, Double), #toInterval: (Double, Double)) -> Double