These constants are used to specify how numbers should be rounded. These constants are used by the roundingModeand setRoundingMode: methods.
Available in Mac OS X v10.4 and later.
C# | Visual Basic | Visual C++ |
public enum NSNumberFormatterRoundingMode
Public Enumeration NSNumberFormatterRoundingMode
public enum class NSNumberFormatterRoundingMode
Member | Description |
---|---|
NSNumberFormatterRoundCeiling | Round up to next larger number with the proper number of digits after the decimal separator. Available in Mac OS X v10.4 and later. |
NSNumberFormatterRoundFloor | Round down to next smaller number with the proper number of digits after the decimal separator. Available in Mac OS X v10.4 and later. |
NSNumberFormatterRoundDown | Round down to next smaller number with the proper number of digits after the decimal separator. Available in Mac OS X v10.4 and later. |
NSNumberFormatterRoundUp | Round up to next larger number with the proper number of digits after the decimal separator. Available in Mac OS X v10.4 and later. |
NSNumberFormatterRoundHalfEven | Round the last digit, when followed by a 5, toward an even digit (.25 -> .2, .35 -> .4) Available in Mac OS X v10.4 and later. |
NSNumberFormatterRoundHalfDown | Round down when a 5 follows putative last digit. Available in Mac OS X v10.4 and later. |
NSNumberFormatterRoundHalfUp | Round up when a 5 follows putative last digit. Available in Mac OS X v10.4 and later. |
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)