Functions
The following functions are available globally.
-
Returns the result of adding
lefttoright.Declaration
Swift
public func + (left: NSDecimalNumber, right: NSDecimalNumber) -> NSDecimalNumberParameters
leftThe left operand
rightThe right operand
Return Value
The result
-
Adds
lefttorightand assigns the result toleft.Declaration
Swift
public func += (left: inout NSDecimalNumber, right: NSDecimalNumber)Parameters
leftThe left operand
rightThe right operand
-
Returns the result of subtracting
rightfromright.Declaration
Swift
public func - (left: NSDecimalNumber, right: NSDecimalNumber) -> NSDecimalNumberParameters
leftThe left operand
rightThe right operand
Return Value
The result
-
Subtracts
rightfromleftand assigns the result toleft.Declaration
Swift
public func -= (left: inout NSDecimalNumber, right: NSDecimalNumber)Parameters
leftThe left operand
rightThe right operand
-
Returns the result of multiplying
leftbyright.Declaration
Swift
public func * (left: NSDecimalNumber, right: NSDecimalNumber) -> NSDecimalNumberParameters
leftThe left operand
rightThe right operand
Return Value
The result
-
Multiplies
leftbyrightand assigns the result toleft.Declaration
Swift
public func *= (left: inout NSDecimalNumber, right: NSDecimalNumber)Parameters
leftThe left operand
rightThe right operand
-
Returns the result of dividing
leftbyright.Declaration
Swift
public func / (left: NSDecimalNumber, right: NSDecimalNumber) -> NSDecimalNumberParameters
leftThe left operand
rightThe right operand
Return Value
The result
-
Divides
leftbyrightand assigns the result toleft.Declaration
Swift
public func /= (left: inout NSDecimalNumber, right: NSDecimalNumber)Parameters
leftThe left operand
rightThe right operand
-
Returns the minimum value of
leftandright.Declaration
Swift
public func min(_ left: NSDecimalNumber, _ right: NSDecimalNumber) -> NSDecimalNumberParameters
leftThe left operand
rightThe right operand
Return Value
leftifleftis less thanright, otherwiseright -
Returns the maximum value of
leftandright.Declaration
Swift
public func max(_ left: NSDecimalNumber, _ right: NSDecimalNumber) -> NSDecimalNumberParameters
leftThe left operand
rightThe right operand
Return Value
leftifleftis greater thanright, otherwiseright -
Invokes the provided
blockand returns the result.let retval = run { // do stuff and return a value }Declaration
Swift
@inlinable @inline(__always) public func run<T>(_ block: () -> T) -> TParameters
blockThe block to invoke
Return Value
The result of invoking
block
View on GitHub
Install in Dash
Functions Reference