ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Class ilMathPhpAdapter. More...
Public Member Functions | ||||||||||||
add ($left_operand, $right_operand, $scale=null) | ||||||||||||
{Adds two numbers.
| ||||||||||||
sub ($left_operand, $right_operand, $scale=null) | ||||||||||||
{Subtracts two numbers.
| ||||||||||||
mul ($left_operand, $right_operand, $scale=null) | ||||||||||||
{Multiplies two numbers.
| ||||||||||||
div ($left_operand, $right_operand, $scale=null) | ||||||||||||
{Divides two numbers.
| ||||||||||||
mod ($left_operand, $right_operand) | ||||||||||||
{Gets modulus of two numbers.
| ||||||||||||
pow ($left_operand, $right_operand, $scale=null) | ||||||||||||
{Raises a number to another.
| ||||||||||||
sqrt ($operand, $scale=null) | ||||||||||||
{Gets the square root of a number.
| ||||||||||||
comp ($left_operand, $right_operand, $scale=null) | ||||||||||||
{Compares two numbers.
| ||||||||||||
Public Member Functions inherited from ilMathBaseAdapter | ||||||||||||
applyScale ($number, $scale=null) | ||||||||||||
This method adapts the behaviour of bcscale() More... | ||||||||||||
round ($value, $precision=0) | ||||||||||||
| ||||||||||||
equals ($left_operand, $right_operand, $scale=null) | ||||||||||||
{Checks whether or not two numbers are identical.
| ||||||||||||
Additional Inherited Members | |
Protected Member Functions inherited from ilMathBaseAdapter | |
normalize ($number) | |
This function fixes problems which occur when locale ist set to de_DE for example, because bc* function expecting strings. More... | |
exp2dec ($float_str) | |
Moved from ilMath... More... | |
Class ilMathPhpAdapter.
Definition at line 10 of file class.ilMathPhpAdapter.php.
ilMathPhpAdapter::add | ( | $left_operand, | |
$right_operand, | |||
$scale = null |
|||
) |
{Adds two numbers.
mixed | $left_operand | |
mixed | $right_operand | |
int | $scale |
Implements ilMathAdapter.
Definition at line 15 of file class.ilMathPhpAdapter.php.
References $res, ilMathBaseAdapter\applyScale(), and ilMathBaseAdapter\normalize().
ilMathPhpAdapter::comp | ( | $left_operand, | |
$right_operand, | |||
$scale = null |
|||
) |
{Compares two numbers.
mixed | $left_operand | |
mixed | $right_operand | |
int | $scale |
Implements ilMathAdapter.
Definition at line 116 of file class.ilMathPhpAdapter.php.
References ilMathBaseAdapter\applyScale(), and ilMathBaseAdapter\normalize().
ilMathPhpAdapter::div | ( | $left_operand, | |
$right_operand, | |||
$scale = null |
|||
) |
{Divides two numbers.
mixed | $left_operand | |
mixed | $right_operand | |
int | $scale |
ilMathDivisionByZeroException |
Implements ilMathAdapter.
Definition at line 55 of file class.ilMathPhpAdapter.php.
References $res, ilMathBaseAdapter\applyScale(), and ilMathBaseAdapter\normalize().
ilMathPhpAdapter::mod | ( | $left_operand, | |
$right_operand | |||
) |
{Gets modulus of two numbers.
mixed | $left_operand | |
mixed | $right_operand |
ilMathDivisionByZeroException |
Implements ilMathAdapter.
Definition at line 81 of file class.ilMathPhpAdapter.php.
References $res, and ilMathBaseAdapter\normalize().
ilMathPhpAdapter::mul | ( | $left_operand, | |
$right_operand, | |||
$scale = null |
|||
) |
{Multiplies two numbers.
mixed | $left_operand | |
mixed | $right_operand | |
int | $scale |
Implements ilMathAdapter.
Definition at line 35 of file class.ilMathPhpAdapter.php.
References $res, ilMathBaseAdapter\applyScale(), and ilMathBaseAdapter\normalize().
ilMathPhpAdapter::pow | ( | $left_operand, | |
$right_operand, | |||
$scale = null |
|||
) |
{Raises a number to another.
mixed | $left_operand | |
mixed | $right_operand | |
int | $scale |
Implements ilMathAdapter.
Definition at line 96 of file class.ilMathPhpAdapter.php.
References $res, ilMathBaseAdapter\applyScale(), and ilMathBaseAdapter\normalize().
ilMathPhpAdapter::sqrt | ( | $operand, | |
$scale = null |
|||
) |
{Gets the square root of a number.
mixed | $operand | |
int | $scale |
Implements ilMathAdapter.
Definition at line 106 of file class.ilMathPhpAdapter.php.
References $res, ilMathBaseAdapter\applyScale(), and ilMathBaseAdapter\normalize().
ilMathPhpAdapter::sub | ( | $left_operand, | |
$right_operand, | |||
$scale = null |
|||
) |
{Subtracts two numbers.
mixed | $left_operand | |
mixed | $right_operand | |
int | $scale |
Implements ilMathAdapter.
Definition at line 25 of file class.ilMathPhpAdapter.php.
References $res, ilMathBaseAdapter\applyScale(), and ilMathBaseAdapter\normalize().