Calculations
-
A
See moreCalculation
-compatible operand used by theCalculate
shortcut.Declaration
Swift
public enum CalculationOperand : Encodable
-
Represents a value that can be used as a operand in a
See moreCalculation
.Declaration
Swift
public protocol CalculationOperandConvertible
-
Makes a calculation that adds the left-hand and right-hand arguments.
Declaration
Swift
public func + (lhs: CalculationOperandConvertible, rhs: CalculationOperandConvertible) -> Calculation
Parameters
lhs
An addend.
rhs
An addend.
Return Value
An addition calculation.
-
Makes a calculation that subtracts the right-hand from the left-hand argument.
Declaration
Swift
public func - (lhs: CalculationOperandConvertible, rhs: CalculationOperandConvertible) -> Calculation
Parameters
lhs
The minuend.
rhs
The subtrahend.
Return Value
A subtraction calculation.
-
Makes a calculation the multiplies the left-hand and right-hand arguments.
Declaration
Swift
public func * (lhs: CalculationOperandConvertible, rhs: CalculationOperandConvertible) -> Calculation
Parameters
lhs
A factor.
rhs
A factor.
Return Value
A multiplication calculation.
-
Makes a calculation that divides the left-hand from the right-hand argument.
Declaration
Swift
public func / (lhs: CalculationOperandConvertible, rhs: CalculationOperandConvertible) -> Calculation
Parameters
lhs
The dividend.
rhs
The divisor.
Return Value
A division calculation.