ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMathAdapter Interface Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 add ($left_operand, $right_operand, ?int $scale=null)
 Adds two numbers. More...
 
 sub ($left_operand, $right_operand, ?int $scale=null)
 Subtracts two numbers. More...
 
 mul ($left_operand, $right_operand, ?int $scale=null)
 Multiplies two numbers. More...
 
 div ($left_operand, $right_operand, ?int $scale=null)
 Divides two numbers. More...
 
 mod ($left_operand, $right_operand)
 Gets modulus of two numbers. More...
 
 pow ($left_operand, $right_operand, ?int $scale=null)
 Raises a number to another. More...
 
 sqrt ($operand, ?int $scale=null)
 Gets the square root of a number. More...
 
 comp ($left_operand, $right_operand, ?int $scale=null)
 Compares two numbers. More...
 
 equals ($left_operand, $right_operand, ?int $scale=null)
 Checks whether or not two numbers are identical. More...
 
 applyScale ($left_operand, ?int $scale=null)
 This method adapts the behaviour of bcscale() More...
 
 round ($value, int $precision=0)
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Interface ilMathAdapter

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

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

Member Function Documentation

◆ add()

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

Adds two numbers.

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

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

◆ applyScale()

ilMathAdapter::applyScale (   $left_operand,
?int  $scale = null 
)

This method adapts the behaviour of bcscale()

Parameters
mixed$left_operand
int | null$scale
Returns
mixed

Implemented in ilMathBaseAdapter.

◆ comp()

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

Compares two numbers.

Parameters
mixed$left_operand
mixed$right_operand
int | null$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,
?int  $scale = null 
)

Divides two numbers.

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

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

◆ equals()

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

Checks whether or not two numbers are identical.

Parameters
mixed$left_operand
mixed$right_operand
int | null$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,
?int  $scale = null 
)

Multiplies two numbers.

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

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

◆ pow()

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

Raises a number to another.

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

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

◆ round()

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

Implemented in ilMathBaseAdapter.

◆ sqrt()

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

Gets the square root of a number.

Parameters
mixed$operand
int | null$scale
Returns
mixed

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.

◆ sub()

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

Subtracts two numbers.

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

Implemented in ilMathPhpAdapter, and ilMathBCMathAdapter.


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