Numeric
Index
Interfaces
Add
Type parameters
- Left
- Right = Left
- Output = Left
+
CheckedAdd
Type parameters
- Left
- Right = Left
- Output = Left
+?
Addition operator that returns
Noneinstead of wrapping around on overflow.
CheckedDivide
Type parameters
- Base
- Divider = Base
- Output = Base
/?
Division operator
CheckedMultiply
Type parameters
- Base
- Multiplier = Base
- Output = Base
*?
Multiplication operator that returns
Noneinstead of wrapping around on overflow.
CheckedPower
Type parameters
- Left
- Right = Left
- Output = Left
**?
Power operator that returns
Noneinstead of wrapping around on overflow.
CheckedRemainder
Type parameters
- Base
- Divider = Base
- Output = Base
%?
Remainder operator
CheckedSubtract
Type parameters
- Left
- Right = Left
- Output = Left
-?
Subtraction operator that returns
Noneinstead of wrapping around on overflow.
Divide
Type parameters
- Base
- Divider = Base
- Output = Base
/
Division operator
Integral
Integral type
Type parameters
- T
constructor
%
Remainder operator
*
Multiplication operator
+
Addition operator
-
Subtraction operator
/
Division operator
/%
Quotient/Modulo operator
abs
Absolute value. It should satisfy
Numeric['*'](Numeric.abs(x), Numeric.sign(x)) == x
asInt
Converts the given value to a Int.
fromInt
isNegative
Returns true if the number is negative and false if the number is zero or positive.
isOne
Returns true if self is equal to the multiplicative identity.
isPositive
Returns true if the number is positive and false if the number is zero or negative.
isZero
Returns true if self is equal to the additive identity.
negate
Negates the given value.
one
Returns the additive identity element of
T, 0.
sign
Sign of a number. It should satisfy
TSigned['*'](TSigned.abs(x), TSigned.sign(x)) == x
zero
Returns the additive identity element of
T, 0.
IntegralParameters
Type parameters
- T
compare
%
Remainder operator
*
Multiplication operator
+
Addition operator
optional-
Subtraction operator
/
Division operator
optionalabs
Absolute value. It should satisfy
Numeric['*'](Numeric.abs(x), Numeric.sign(x)) == x
asInt
Converts the given value to a Int.
fromInt
optionalisNegative
Returns true if the number is negative and false if the number is zero or positive.
optionalisOne
Returns true if self is equal to the multiplicative identity.
optionalisPositive
Returns true if the number is positive and false if the number is zero or negative.
optionalisZero
Returns true if self is equal to the additive identity.
optionalnegate
Negates the given value.
optionalone
Returns the additive identity element of
T, 0.
optionalsign
Sign of a number. It should satisfy
TSigned['*'](TSigned.abs(x), TSigned.sign(x)) == x
optionalzero
Returns the additive identity element of
T, 0.
Multiply
Type parameters
- Left
- Right = Left
- Output = Left
*
Multiplication operator
Negate
Type parameters
- Self
- Output = Self
negate
Negates the given value.
Numeric
Type parameters
- T
constructor
*
Multiplication operator
+
Addition operator
-
Subtraction operator
abs
Absolute value. It should satisfy
Numeric['*'](Numeric.abs(x), Numeric.sign(x)) == x
asInt
Converts the given value to a Int.
fromInt
isNegative
Returns true if the number is negative and false if the number is zero or positive.
isOne
Returns true if self is equal to the multiplicative identity.
isPositive
Returns true if the number is positive and false if the number is zero or negative.
isZero
Returns true if self is equal to the additive identity.
negate
Negates the given value.
one
Returns the additive identity element of
T, 0.
sign
Sign of a number. It should satisfy
TSigned['*'](TSigned.abs(x), TSigned.sign(x)) == x
zero
Returns the additive identity element of
T, 0.
NumericParameters
Type parameters
- T
compare
*
Multiplication operator
+
Addition operator
optional-
Subtraction operator
optionalabs
Absolute value. It should satisfy
Numeric['*'](Numeric.abs(x), Numeric.sign(x)) == x
asInt
Converts the given value to a Int.
fromInt
optionalisNegative
Returns true if the number is negative and false if the number is zero or positive.
optionalisOne
Returns true if self is equal to the multiplicative identity.
optionalisPositive
Returns true if the number is positive and false if the number is zero or negative.
optionalisZero
Returns true if self is equal to the additive identity.
optionalnegate
Negates the given value.
optionalone
Returns the additive identity element of
T, 0.
optionalsign
Sign of a number. It should satisfy
TSigned['*'](TSigned.abs(x), TSigned.sign(x)) == x
optionalzero
Returns the additive identity element of
T, 0.
One
Type parameters
- T
isOne
Returns true if self is equal to the multiplicative identity.
one
Returns the additive identity element of
T, 0.
Power
Type parameters
- Left
- Right = Left
- Output = Left
**
Power operator
Remainder
Type parameters
- Base
- Divider = Base
- Output = Base
%
Remainder operator
Signed
Type parameters
- T
abs
Absolute value. It should satisfy
Numeric['*'](Numeric.abs(x), Numeric.sign(x)) == x
isNegative
Returns true if the number is negative and false if the number is zero or positive.
isPositive
Returns true if the number is positive and false if the number is zero or negative.
sign
Sign of a number. It should satisfy
TSigned['*'](TSigned.abs(x), TSigned.sign(x)) == x
Subtract
Type parameters
- Left
- Right = Left
- Output = Left
-
Subtraction operator
Zero
Type parameters
- T
isZero
Returns true if self is equal to the additive identity.
zero
Returns the additive identity element of
T, 0.
Functions
Integral
Type parameters
- T
Numeric
Type parameters
- T
Addition operator