Various math functions
- Source:
Methods
(static) arrayCartesianProduct(a, b)
Collection of all possible ordered pairs (a, b) such that the first element a belongs to set A and the second element b belongs to set B.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
Array.<number> | first set |
b |
Array.<number> | second set |
- Source:
Returns:
Set of coordinates, pairing all members of the first set and the second set
(static) factorize(numInches)
...
Parameters:
| Name | Type | Description |
|---|---|---|
numInches |
* |
- Source:
Returns:
...
(static) inchesToMm(numInches)
Converts distance in inches to mm
Parameters:
| Name | Type | Description |
|---|---|---|
numInches |
* |
- Source:
Returns:
distance in mm
(static) isEven(n)
Checks if a given integer is even
Parameters:
| Name | Type | Description |
|---|---|---|
n |
number | an integer |
- Source:
Returns:
true if even, false if not
(static) isOdd(n)
Checks if a given integer is odd
Parameters:
| Name | Type | Description |
|---|---|---|
n |
number | an integer |
- Source:
Returns:
true if odd, false if not
(static) mmToInches(numInches)
Converts distance in mm to inches
Parameters:
| Name | Type | Description |
|---|---|---|
numInches |
number |
- Source:
Returns:
distance in inches