extra-math 1.3.0 → 1.3.1

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.
Files changed (2) hide show
  1. package/index.d.ts +7 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -133,36 +133,43 @@ declare function dist(x1: number, y1: number, z1: number, x2: number, y2: number
133
133
  /**
134
134
  * Find the sum of numbers (Σ).
135
135
  * @param xs a list of numbers
136
+ * @returns Σxᵢ
136
137
  */
137
138
  declare function sum(...xs: number[]): number;
138
139
  /**
139
140
  * Find the product of numbers (∏).
140
141
  * @param xs a list of numbers
142
+ * @returns ∏xᵢ
141
143
  */
142
144
  declare function product(...xs: number[]): number;
143
145
  /**
144
146
  * Find the average of numbers.
145
147
  * @param xs a list of numbers
148
+ * @returns Σxᵢ/n | n = size(xs)
146
149
  */
147
150
  declare function mean(...xs: number[]): number;
148
151
  /**
149
152
  * Find the value separating the higher and lower halves of numbers.
150
153
  * @param xs a list of numbers
154
+ * @returns xₘ | sort(xs) = [..., xₘ, ...]
151
155
  */
152
156
  declare function median(...xs: number[]): number;
153
157
  /**
154
158
  * Find the values that appear most often.
155
159
  * @param xs a list of numbers
160
+ * @returns [xₘ₁, xₘ₂, ...] | count(xₘᵢ) ≥ count(xᵢ) ∀ xᵢ ∈ xs
156
161
  */
157
162
  declare function modes(...xs: number[]): number[];
158
163
  /**
159
164
  * Find the difference between the largest and smallest values.
160
165
  * @param xs a list of numbers
166
+ * @returns max(xs) - min(xs)
161
167
  */
162
168
  declare function range(...xs: number[]): number;
163
169
  /**
164
170
  * Find the mean of squared deviation of numbers from its mean.
165
171
  * @param xs a list of numbers
172
+ * @returns σ² = E[(xs - µ)²] | µ = mean(xs)
166
173
  */
167
174
  declare function variance(...xs: number[]): number;
168
175
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extra-math",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Mathematics is the classification and study of all possible patterns.",
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",