ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMathAdapter Interface Reference

Interface ilMathAdapter. More...

+ Inheritance diagram for ilMathAdapter:
+ Collaboration diagram for ilMathAdapter:

Public Member Functions

 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...
 
 equals ($left_operand, $right_operand, $scale=null)
 Checks whether or not two numbers are identical. More...
 
 applyScale ($left_operand, $scale=null)
 
 round ($value, $precision=0)
 

Detailed Description

Interface ilMathAdapter.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 8 of file interface.ilMathAdapter.php.

Member Function Documentation

◆ add()

ilMathAdapter::add (   $left_operand,
  $right_operand,
  $scale = null 
)

Adds two numbers.

Parameters
mixed$left_operand
mixed$right_operand
int$scale
Returns
mixed

Implemented in ilMathBCMathAdapter, and ilMathPhpAdapter.

◆ applyScale()

ilMathAdapter::applyScale (   $left_operand,
  $scale = null 
)
Parameters
mixed$left_operand
int$scale
Returns
mixed

Implemented in ilMathBaseAdapter.

◆ comp()

ilMathAdapter::comp (   $left_operand,
  $right_operand,
  $scale = null 
)

Compares two numbers.

Parameters
mixed$left_operand
mixed$right_operand
int$scale
Returns
mixed

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

Referenced by ilMathBaseAdapter\equals().

+ Here is the caller graph for this function:

◆ div()

ilMathAdapter::div (   $left_operand,
  $right_operand,
  $scale = null 
)

Divides two numbers.

Parameters
mixed$left_operand
mixed$right_operand
int$scale
Returns
mixed
Exceptions
ilMathDivisionByZeroException

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

◆ equals()

ilMathAdapter::equals (   $left_operand,
  $right_operand,
  $scale = null 
)

Checks whether or not two numbers are identical.

Parameters
mixed$left_operand
mixed$right_operand
int$scale
Returns
bool

Implemented in ilMathBaseAdapter.

◆ mod()

ilMathAdapter::mod (   $left_operand,
  $right_operand 
)

Gets modulus of two numbers.

Parameters
mixed$left_operand
mixed$right_operand
Returns
mixed
Exceptions
ilMathDivisionByZeroException

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

◆ mul()

ilMathAdapter::mul (   $left_operand,
  $right_operand,
  $scale = null 
)

Multiplies two numbers.

Parameters
mixed$left_operand
mixed$right_operand
int$scale
Returns
mixed

Implemented in ilMathBCMathAdapter, and ilMathPhpAdapter.

◆ pow()

ilMathAdapter::pow (   $left_operand,
  $right_operand,
  $scale = null 
)

Raises a number to another.

Parameters
mixed$left_operand
mixed$right_operand
int$scale
Returns
mixed

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

Referenced by ilMathBaseAdapter\normalize().

+ Here is the caller graph for this function:

◆ round()

ilMathAdapter::round (   $value,
  $precision = 0 
)
Parameters
mixed$value
int$precision
Returns
string

Implemented in ilMathBaseAdapter.

◆ sqrt()

ilMathAdapter::sqrt (   $operand,
  $scale = null 
)

Gets the square root of a number.

Parameters
mixed$operand
int$scale
Returns
mixed

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

◆ sub()

ilMathAdapter::sub (   $left_operand,
  $right_operand,
  $scale = null 
)

Subtracts two numbers.

Parameters
mixed$left_operand
mixed$right_operand
int$scale
Returns
mixed

Implemented in ilMathBCMathAdapter, and ilMathPhpAdapter.


The documentation for this interface was generated from the following file: