Compacts the decimal structure for efficiency.


func NSDecimalCompact(_ number: UnsafeMutablePointer<Decimal>)


Formats number so that calculations using it will take up as little memory as possible. All the NSDecimal... arithmetic functions expect compact Decimal arguments.

For more information, see Number and Value Programming Topics.

See Also

Performing Arithmetic Using References

typealias Decimal.RoundingMode

An alias for an enumeration that specifies possible rounding modes.

enum NSDecimalNumber.RoundingMode

These constants specify rounding behaviors.

typealias Decimal.CalculationError

An alias for a type that specifies possible calculation errors.