Enumeration

NSNumberFormatterRoundingMode

These constants are used to specify how numbers should be rounded. These constants are used by the roundingMode property.

Declaration

typedef enum NSNumberFormatterRoundingMode : NSUInteger {
    ...
} NSNumberFormatterRoundingMode;

Topics

Constants

NSNumberFormatterRoundCeiling

Round towards positive infinity.

NSNumberFormatterRoundFloor

Round towards negative infinity.

NSNumberFormatterRoundDown

Round towards zero.

NSNumberFormatterRoundUp

Round away from zero.

NSNumberFormatterRoundHalfEven

Round towards the nearest integer, or towards an even number if equidistant.

NSNumberFormatterRoundHalfDown

Round towards the nearest integer, or towards zero if equidistant.

NSNumberFormatterRoundHalfUp

Round towards the nearest integer, or away from zero if equidistant.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software