io.sarl.lang.core.scoping.extensions.numbers.arithmetic
Class PrimitiveDoubleArithmeticExtensions
final class PrimitiveDoubleArithmeticExtensions
extends java.lang.Object
Provide static operators for numbers of type double.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
core
Since:
0.7
See:
"https://github.com/eclipse/xtext-extras/issues/186"
Action Summary
Modifier and type Action and description
static double operator_divide(double,Number)
The binary divide operator.
static double operator_minus(double,Number)
The binary minus operator.
static double operator_modulo(double,Number)
The binary modulo operator.
static double operator_multiply(double,Number)
The binary multiply operator.
static double operator_plus(double,Number)
The binary plus operator.
static double operator_power(double,Number)
The binary power operator.
Action Details
operator_divide(double,Number)
def operator_divide(double,Number) : double
The binary divide operator. This is the equivalent to the Java / operator. This function is not null-safe.
Parameters:
left - a number.
right - a number.
Returns:
left/right
operator_minus(double,Number)
def operator_minus(double,Number) : double
The binary minus operator. This is the equivalent to the Java - operator. This function is not null-safe.
Parameters:
left - a number.
right - a number.
Returns:
left-right
operator_modulo(double,Number)
def operator_modulo(double,Number) : double
The binary modulo operator. This is the equivalent to the Java % operator. This function is not null-safe.
Parameters:
left - a number.
right - a number.
Returns:
left%right
operator_multiply(double,Number)
def operator_multiply(double,Number) : double
The binary multiply operator. This is the equivalent to the Java * operator. This function is not null-safe.
Parameters:
left - a number.
right - a number.
Returns:
left*right
operator_plus(double,Number)
def operator_plus(double,Number) : double
The binary plus operator. This is the equivalent to the Java + operator. This function is not null-safe.
Parameters:
left - a number.
right - a number.
Returns:
left+right
operator_power(double,Number)
def operator_power(double,Number) : double
The binary power operator. This is the equivalent to the Java's Math.pow() function. This function is not null-safe.
Parameters:
left - a number.
right - a number.
Returns:
Math::pow(left, right)