Double

extension Double

Some common extensions to implement utility methods on standard classes.

  • Rounds the current value to the given number of digits.

    Declaration

    Swift

    func roundToDecimal(_ fractionDigits: Int) -> Double
  • Converts m/s value in Km/h

    Declaration

    Swift

    func msToKmH() -> Double