Decimals
These
functions are used to perform decimal
arithmetic with NSDecimal
type
struct
s. The Foundation class
NSDecimalNumber
may also be used for decimal
arithmetic.
-
NSDecimalAdd
NSCalculationError
NSDecimalAdd(NSDecimal
*result
,const
NSDecimal
*leftOperand
,const
NSDecimal
*rightOperand
,NSRoundingMode
roundingMode)
-
NSDecimalCompact
void
NSDecimalCompact(NSDecimal
*number)
-
NSDecimalCompare
NSComparisonResult
NSDecimalCompare(const
NSDecimal
*leftOperand
,const
NSDecimal
*rightOperand)
-
NSDecimalCopy
void
NSDecimalCopy(NSDecimal
*destination
,const
NSDecimal
*source)
-
NSDecimalDivide
NSCalculationError
NSDecimalDivide(NSDecimal
*result
,const
NSDecimal
*leftOperand
,const
NSDecimal
*rightOperand
,NSRoundingMode
roundingMode)
-
NSDecimalMultiply
NSCalculationError
NSDecimalMultiply(NSDecimal
*result
,const
NSDecimal
*leftOperand
,const
NSDecimal
*rightOperand
,NSRoundingMode
roundingMode)
-
NSDecimalMultiplyByPowerOf10
NSCalculationError
NSDecimalMultiplyByPowerOf10(NSDecimal
*result
,const
NSDecimal
*number
,short
power
,NSRoundingMode
roundingMode)
-
NSDecimalNormalize
NSCalculationError
NSDecimalNormalize(NSDecimal
*number1
,NSDecimal
*number2
,NSRoundingMode
roundingMode)
-
NSDecimalPower
NSCalculationError
NSDecimalPower(NSDecimal
*result
,const
NSDecimal
*number
,unsigned
power
,NSRoundingMode
roundingMode)
-
NSDecimalRound
void
NSDecimalRound(NSDecimal
*result
,const
NSDecimal
*number
,int
scale
,NSRoundingMode
roundingMode)
-
NSDecimalString
NSString ...
Get Cocoa in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.