@thi.ng/random 3.2.1 → 3.2.2

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2021-11-19T07:59:51Z
3
+ - **Last updated**: 2021-11-21T17:09:28Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [3.2.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.2.2) (2021-11-21)
13
+
14
+ #### 🩹 Bug fixes
15
+
16
+ - off-by-one error in ARandom ([0bf9828](https://github.com/thi-ng/umbrella/commit/0bf9828))
17
+
12
18
  ## [3.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.2.0) (2021-11-17)
13
19
 
14
20
  #### 🚀 Features
package/api.d.ts CHANGED
@@ -13,7 +13,7 @@ export interface INorm {
13
13
  }
14
14
  export interface IRandom extends INorm {
15
15
  /**
16
- * Returns unsigned 32bit int
16
+ * Returns unsigned 32bit int [0..0xffffffff]
17
17
  */
18
18
  int(): number;
19
19
  /**
package/arandom.js CHANGED
@@ -1,4 +1,4 @@
1
- const INV_MAX = 1 / 0xffffffff;
1
+ const INV_MAX = 1 / (2 ** 32);
2
2
  export class ARandom {
3
3
  float(norm = 1) {
4
4
  return this.int() * INV_MAX * norm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/random",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,14 +34,14 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.3.1",
38
- "@thi.ng/checks": "^3.1.1",
39
- "@thi.ng/errors": "^2.1.1",
40
- "@thi.ng/hex": "^2.1.1"
37
+ "@thi.ng/api": "^8.3.2",
38
+ "@thi.ng/checks": "^3.1.2",
39
+ "@thi.ng/errors": "^2.1.2",
40
+ "@thi.ng/hex": "^2.1.2"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@microsoft/api-extractor": "^7.18.19",
44
- "@thi.ng/testament": "^0.2.1",
44
+ "@thi.ng/testament": "^0.2.2",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
47
  "typedoc": "^0.22.9",
@@ -153,5 +153,5 @@
153
153
  "ksuid"
154
154
  ]
155
155
  },
156
- "gitHead": "8bd27c8bde0b770e7c001943f11c951cd345d668\n"
156
+ "gitHead": "e8a7c2a40191b391cef182c2978e5a6c85987a87\n"
157
157
  }