|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| calc_formula ($formula, $params=false) | |
| set_params ($params) | |
| evaluate () | |
| get_error () | |
| localize ($formula) | |
| unlocalize ($formula) | |
Data Fields | |
| $_em | |
| $_nfx = false | |
| $_error = false | |
Definition at line 38 of file mathslib.php.
| calc_formula | ( | $ | formula, |
| $ | params = false |
||
| ) |
Constructor for spreadsheet formula with optional parameters
| string | $formula | with leading = |
| array | $params | associative array of parameters used in formula. All parameter names must be lowercase! |
Definition at line 51 of file mathslib.php.

| evaluate | ( | ) |
Evaluate formula
Definition at line 88 of file mathslib.php.
| get_error | ( | ) |
Get last error. TODO: localize the strings from contructor and EvalMath library
Definition at line 108 of file mathslib.php.
| localize | ( | $ | formula | ) |
Similar to format_float, formats the numbers and list separators according to locale specifics.
| string | $formula |
Definition at line 118 of file mathslib.php.
| set_params | ( | $ | params | ) |
Raplace parameters used in existing formula, parameter names must contain only lowercase [a-z] letters, no other characters are allowed!
| array | $params | associative array of parameters used in formula |
Definition at line 79 of file mathslib.php.

| unlocalize | ( | $ | formula | ) |
Similar to unformat_float, converts floats and lists to PHP standards.
| string | $formula | localised formula |
Definition at line 130 of file mathslib.php.

| $_em |
Definition at line 41 of file mathslib.php.
| $_error = false |
Definition at line 43 of file mathslib.php.
| $_nfx = false |
Definition at line 42 of file mathslib.php.