TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2016 |
SPMSupports SPM | ✓ |
Maintained by Stuart Wakefield.
Provides extensions to NSDecimalNumber
to support arithmetic operations:
let a = NSDecimalNumber(string: "0.4")
let b = NSDecimalNumber(string: "10")
let c = a * b
a == b
Compares the NSDecimalNumber
instances a
and b
returning true
if both are equal and false
otherwise. See NSDecimalNumber.compare(_:)
for underlying implementation details, will return true if result is NSComparisonResult.OrderedSame
.
a > b
a < b
a >= b
a <= b
a + b
a - b
a * b
a / b
a ** b
min(a, b)
max(a, b)