ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Class ilMathBaseAdapter. More...
Public Member Functions | ||||||||||
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.
| ||||||||||
Public Member Functions inherited from ilMathAdapter | ||||||||||
add ($left_operand, $right_operand, $scale=null) | ||||||||||
Adds two numbers. More... | ||||||||||
sub ($left_operand, $right_operand, $scale=null) | ||||||||||
Subtracts two numbers. More... | ||||||||||
mul ($left_operand, $right_operand, $scale=null) | ||||||||||
Multiplies two numbers. More... | ||||||||||
div ($left_operand, $right_operand, $scale=null) | ||||||||||
Divides two numbers. More... | ||||||||||
mod ($left_operand, $right_operand) | ||||||||||
Gets modulus of two numbers. More... | ||||||||||
pow ($left_operand, $right_operand, $scale=null) | ||||||||||
Raises a number to another. More... | ||||||||||
sqrt ($operand, $scale=null) | ||||||||||
Gets the square root of a number. More... | ||||||||||
comp ($left_operand, $right_operand, $scale=null) | ||||||||||
Compares two numbers. More... | ||||||||||
Protected Member Functions | |
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 ilMathBaseAdapter.
Definition at line 10 of file class.ilMathBaseAdapter.php.
ilMathBaseAdapter::applyScale | ( | $number, | |
$scale = null |
|||
) |
This method adapts the behaviour of bcscale()
mixed | $number | |
integer | $scale |
Implements ilMathAdapter.
Definition at line 18 of file class.ilMathBaseAdapter.php.
References exp2dec().
Referenced by ilMathPhpAdapter\add(), ilMathPhpAdapter\comp(), ilMathPhpAdapter\div(), ilMathPhpAdapter\mul(), ilMathBCMathAdapter\pow(), ilMathPhpAdapter\pow(), ilMathPhpAdapter\sqrt(), and ilMathPhpAdapter\sub().
ilMathBaseAdapter::equals | ( | $left_operand, | |
$right_operand, | |||
$scale = null |
|||
) |
{Checks whether or not two numbers are identical.
mixed | $left_operand | |
mixed | $right_operand | |
int | $scale |
Implements ilMathAdapter.
Definition at line 51 of file class.ilMathBaseAdapter.php.
References ilMathAdapter\comp().
|
protected |
Moved from ilMath...
Converts numbers in the form "1.5e4" into decimal notation
Definition at line 92 of file class.ilMathBaseAdapter.php.
References string.
Referenced by applyScale(), normalize(), and ilMathBCMathAdapter\pow().
|
protected |
This function fixes problems which occur when locale ist set to de_DE for example, because bc* function expecting strings.
mixed | $number |
Definition at line 62 of file class.ilMathBaseAdapter.php.
References exp2dec(), and ilMathAdapter\pow().
Referenced by ilMathPhpAdapter\add(), ilMathBCMathAdapter\add(), ilMathPhpAdapter\comp(), ilMathBCMathAdapter\div(), ilMathPhpAdapter\div(), ilMathBCMathAdapter\mod(), ilMathPhpAdapter\mod(), ilMathPhpAdapter\mul(), ilMathBCMathAdapter\mul(), ilMathBCMathAdapter\pow(), ilMathPhpAdapter\pow(), ilMathPhpAdapter\sqrt(), ilMathPhpAdapter\sub(), and ilMathBCMathAdapter\sub().
ilMathBaseAdapter::round | ( | $value, | |
$precision = 0 |
|||
) |
mixed | $value | |
int | $precision |
Implements ilMathAdapter.
Definition at line 43 of file class.ilMathBaseAdapter.php.