Operation
class Operation
This class provides static functions that perform logical or arithmetic operations
Methods
Calculates and returns the result of the bitwise AND on the two given operands.
Calculates and returns the result of the bitwise XOR on the two given operands.
Calculates and returns the result of the logical AND on the two given operands.
Calculates and returns the result of the unary negation on the given operand.
Transfers the argument into the result token (for the else part of a ternary operation)
Details
at line 50
static void
plus(Token $arg1, Token $arg2, Token $result)
Calculates and returns the result of adding two numbers, a date and a number of days, or the concatenation of two strings.
.
at line 108
static void
minus(Token $arg1, Token $arg2, Token $result)
Calculates and returns the result of subtracting two numbers or a date and a number of days.
at line 150
static void
times(Token $arg1, Token $arg2, Token $result)
Calculates and returns the product of two numbers.
at line 173
static void
div(Token $arg1, Token $arg2, Token $result)
Calculates and returns the quotient of the Euclidean division of one number by another.
at line 196
static void
mod(Token $arg1, Token $arg2, Token $result)
Calculates and returns the remainder of the Euclidean division of one number by another.
at line 219
static void
pow(Token $arg1, Token $arg2, Token $result)
Calculates and returns the result of the first operand raised to the power of the operand.
at line 242
static void
bitwiseAnd(Token $arg1, Token $arg2, Token $result)
Calculates and returns the result of the bitwise AND on the two given operands.
at line 265
static void
bitwiseXor(Token $arg1, Token $arg2, Token $result)
Calculates and returns the result of the bitwise XOR on the two given operands.
at line 288
static void
bitwiseOr(Token $arg1, Token $arg2, Token $result)
Calculates and returns the result of the bitwise OR on the two given operands.
at line 311
static void
logicalAnd(Token $arg1, Token $arg2, Token $result)
Calculates and returns the result of the logical AND on the two given operands.
at line 353
static void
logicalOr(Token $arg1, Token $arg2, Token $result)
Calculates and returns the result of the logical OR on the two given operands.
at line 394
static void
unaryPlus(Token $arg1, Token $result)
Calculates and returns the result of the unary positive operation on the given operand.
at line 416
static void
unaryMinus(Token $arg1, Token $result)
Calculates and returns the result of the unary negation on the given operand.
at line 438
static void
not(Token $arg1, Token $result)
Calculates and returns the result of the logical negation on the given operand.
at line 461
static void
degre(Token $arg1, Token $result)
Converts a number expressed in radians to a number expressed in degrees