Contents

rounding(accordingToBehavior:)

Returns a rounded version of the decimal number using the specified rounding behavior.

Declaration

func rounding(accordingToBehavior behavior: (any NSDecimalNumberBehaviors)?) -> NSDecimalNumber

Discussion

For a description of the different ways of rounding, see the roundingMode method in the NSDecimalNumberBehaviors protocol specification.