extra-math 1.3.25 → 1.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,11 +15,11 @@ can be obtained. To calculate the number of ways of *ordering items*, use
|
|
|
15
15
|
[factorial]/`P(n, k)`, [binomial]/`C(n, k)`, or [multinomial]/`n!/k₁!k₂!...`.
|
|
16
16
|
|
|
17
17
|
**Real numbers**: *Range* of a number can be controlled with [constrain],
|
|
18
|
-
[
|
|
18
|
+
[normalize], or [remap]. Use [lerp] for *linear interpolation* (or extrapolation);
|
|
19
19
|
[root] for calculating the *n-th root* of a number; and [log] to find the
|
|
20
20
|
*logarithm* of a number with a given base. Results of *special mathematical
|
|
21
|
-
functions* (approximations) for a given number can be obtained with [
|
|
22
|
-
|
|
21
|
+
functions* (approximations) for a given number can be obtained with [erf]
|
|
22
|
+
and [erfc].
|
|
23
23
|
|
|
24
24
|
**Geometry**: Perform conversion from [degrees] to [radians] and vice versa.
|
|
25
25
|
Find the [magnitude] of a vector or [distance] between two points.
|
|
@@ -75,23 +75,21 @@ math.lcm(2, 3, 4);
|
|
|
75
75
|
| [factorial] | Find the factorial of a number. |
|
|
76
76
|
| [binomial] | Find the number of ways to choose k elements from a set of n elements. |
|
|
77
77
|
| [multinomial] | Find the number of ways to put n objects in m bins (n=sum(kᵢ)). |
|
|
78
|
-
|
|
|
78
|
+
| | |
|
|
79
79
|
| [constrain] | Constrain a number within a minimum and a maximum value. |
|
|
80
|
-
| [
|
|
81
|
-
| [
|
|
80
|
+
| [normalize] | Normalize a number from its current range into a value between 0 and 1. |
|
|
81
|
+
| [remap] | Re-map a number from one range to another. |
|
|
82
82
|
| [lerp] | Linearly interpolate a number between two numbers. |
|
|
83
83
|
| [root] | Find the nth root of a number (ⁿ√). |
|
|
84
84
|
| [log] | Find the logarithm of a number with a given base. |
|
|
85
|
-
| [gamma] | Compute the gamma function of a number (Γ). |
|
|
86
|
-
| [lgamma] | Compute the natural logarithm of the absolute value of the gamma function of a number (log-Γ). |
|
|
87
85
|
| [erf] | Find error function value of number (approximation). |
|
|
88
86
|
| [erfc] | Find the complementary error function value of number (approximation). |
|
|
89
|
-
|
|
|
87
|
+
| | |
|
|
90
88
|
| [degrees] | Convert radians to degrees. |
|
|
91
89
|
| [radians] | Convert degrees to radians. |
|
|
92
90
|
| [magnitude] | Calculate the magnitude (length) of a vector. |
|
|
93
91
|
| [distance] | Calculate the distance between two points. |
|
|
94
|
-
|
|
|
92
|
+
| | |
|
|
95
93
|
| [sum] | Find the sum of numbers (Σ). |
|
|
96
94
|
| [product] | Find the product of numbers (∏). |
|
|
97
95
|
| [mean] | Find the average of numbers. |
|
|
@@ -124,6 +122,9 @@ math.lcm(2, 3, 4);
|
|
|
124
122
|
|
|
125
123
|
[](https://www.youtube.com/watch?v=dW8Cy6WrO94)<br>
|
|
126
124
|
[](https://zenodo.org/badge/latestdoi/141781770)
|
|
125
|
+
[](https://coveralls.io/github/nodef/extra-math?branch=master)
|
|
126
|
+
[](https://codeclimate.com/github/nodef/extra-math/test_coverage)
|
|
127
|
+
[](https://codeclimate.com/github/nodef/extra-math/maintainability)
|
|
127
128
|
|
|
128
129
|
|
|
129
130
|
[rem]: https://nodef.github.io/extra-math/modules.html#rem
|
|
@@ -137,11 +138,9 @@ math.lcm(2, 3, 4);
|
|
|
137
138
|
[constrain]: https://nodef.github.io/extra-math/modules.html#constrain
|
|
138
139
|
[root]: https://nodef.github.io/extra-math/modules.html#root
|
|
139
140
|
[log]: https://nodef.github.io/extra-math/modules.html#log
|
|
140
|
-
[
|
|
141
|
-
[
|
|
141
|
+
[normalize]: https://nodef.github.io/extra-math/modules.html#normalize
|
|
142
|
+
[remap]: https://nodef.github.io/extra-math/modules.html#remap
|
|
142
143
|
[lerp]: https://nodef.github.io/extra-math/modules.html#lerp
|
|
143
|
-
[gamma]: https://nodef.github.io/extra-math/modules.html#gamma
|
|
144
|
-
[lgamma]: https://nodef.github.io/extra-math/modules.html#lgamma
|
|
145
144
|
[erf]: https://nodef.github.io/extra-math/modules.html#erf
|
|
146
145
|
[erfc]: https://nodef.github.io/extra-math/modules.html#erfc
|
|
147
146
|
[degrees]: https://nodef.github.io/extra-math/modules.html#degrees
|