MMO\math
MMO\math · 19 symbols · generated 27 Oct 2026
binomialCoefficient
functions.php:189Compute the binomial coefficient $n! / ($k! * ($n - $k)!)
- Namespace
MMO\math
Call graph
Uses (1)
Used by (1)
bisection
functions.php:203Find a root of a continuous function (fn(x) = 0) using the bisection method
- Namespace
MMO\math- See
https://www.geeksforgeeks.org/dsa/program-for-bisection-method/ WARNING: this only determine ONE solution of all the possible solutions
compare
functions.php:76Compare two values
- Namespace
MMO\math
Call graph
Uses (1)
divide
functions.php:138- Namespace
MMO\math
Call graph
factorial
functions.php:176Do factorial of $n n! = n * (n-1) * (n-2) * ........ * 1
- Namespace
MMO\math
Call graph
Used by (1)
isNumber
functions.php:44Test if a value is a float, int or iNumber
- Namespace
MMO\math
loopValues
functions.php:255Get the numbers a value stands for (used by max, min and size) Plain numbers and set iNumber yield their value, an unset iNumber yields nothing, an iDomain (Interval, Domain) yields its limit (start and end, open bounds included as their limit) and any other IteratorAggregate is walked
- Namespace
MMO\math
| $value | iNumber | IteratorAggregate | int | float | |
| returns | Generator | int|float |
Call graph
Uses (2)
Used by (3)
max
functions.php:284Get the maximum value of a list of numbers (iNumber included)
- Namespace
MMO\math
| ...$values | iNumber | IteratorAggregate | int | float | |
| returns | int | float | null | null if no value is known |
Call graph
Uses (1)
Used by (1)
min
functions.php:303Get the minimum value of a list of numbers (iNumber included)
- Namespace
MMO\math
| ...$values | iNumber | IteratorAggregate | int | float | |
| returns | int | float | null | null if no value is known |
Call graph
Uses (1)
Used by (1)
minus
functions.php:95- Namespace
MMO\math
Call graph
multiply
functions.php:112Multiply any number (iNumber included) by a factor
- Namespace
MMO\math
Call graph
number
functions.php:56Convert any value to a number (int|float)
- Namespace
MMO\math
| $value | mixed | if a string, the value is parsed and it returns an int if it can or a float. if iNumber, it returns its value |
| $convertNumber = true | bool | if false and it is a iNumber, null is returned |
| $ignoreUnits = true | bool | if false and the number has units, null is returned |
| returns | int | float | null | if null, the value cannot be converted to a number |
operatorRegex
functions.php:353Get a regular expression used to tokenize a math expression (used by parse)
- Namespace
MMO\math
| returns | string |
Call graph
Used by (1)
parse
functions.php:380Tokenize a mathematical expression
- Namespace
MMO\math
| $exp | array | string | the mathematical expression |
| $variableFactory = null | null | callable | function($name): ?iNumber. $name is the name of the variable without '$'. If it returns null, a Number is created |
| $customOperators = [] | array | the custom operators in front of parenthesis (like xxx(..,..)) where xxx is the operator |
| $vars = [] | array | |
| returns | iNumber | string |
Call graph
Uses (3)
Used by (2)
plus
functions.php:84- Namespace
MMO\math
power
functions.php:160- Namespace
MMO\math
Call graph
roundScale
functions.php:23Round value to the closest power of ten
- Namespace
MMO\math
scale
functions.php:34Get the power of ten the given value is precise to
- Namespace
MMO\math
Call graph
Used by (1)
size
functions.php:323Get the number of values in the given values
- Namespace
MMO\math
| ...$values | iNumber | IteratorAggregate | int | float | |
| returns | int | float | INF if a value holds a range of numbers |