A protocol that declares three methods that control the discretionary aspects of working with decimal numbers.
- iOS 2.0+
- macOS 10.0+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
rounding methods determine the precision of
NSDecimal’s return values and the way in which those values should be rounded to fit that precision. The
exception method determines the way in which an
NSDecimal object should handle different calculation errors.
For an example of a class that adopts the
NSDecimal protocol, see the specification for