Swiftpack.co - Package - kirkbyo/SciSwift

SciSwift

Metric Units

Basic Usages

import SciSwift

let L1 = 10.0 [m]
let L2 = 5.0 [m]
print(L1 - L2) // 5.0 [m]

let velocity1 = 12 [m/s]
let velocity2 = 18 [km/h]
print(velocity2 - velocity1) // 6 [km/h]

func circumference(radius: SciValue<SI.distance>) -> SciValue<SI.distance> {
    return 2 * Double.pi * radius
}

print(circumference(radius: 1 [m]))

Github

link
Stars: 1

Dependencies

Used By

Total: 0

Releases

Alpha relase - 2020-09-09 15:07:42

Initial release to ensure that the package is configured correctly for external consumers.