smath 1.8.0 → 1.8.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![NPM Downloads](https://img.shields.io/npm/dt/smath)
4
4
  ![NPM Version](https://img.shields.io/npm/v/smath)
5
- ![Relative date](https://img.shields.io/date/1712851398)
5
+ ![Relative date](https://img.shields.io/date/1712869981)
6
6
  ![GitHub watchers](https://img.shields.io/github/watchers/nicfv/npm)
7
7
  ![GitHub forks](https://img.shields.io/github/forks/nicfv/npm)
8
8
  ![GitHub Repo stars](https://img.shields.io/github/stars/nicfv/npm)
@@ -12,7 +12,7 @@
12
12
  smath can be installed from the official [npm package repository](https://www.npmjs.com/package/smath). It is highly recommended to install the latest version, which is installed by default with the following command.
13
13
 
14
14
  ```shell
15
- npm i smath@1.8.0
15
+ npm i smath@1.8.2
16
16
  ```
17
17
 
18
18
  ## Bugs and Requests
package/dist/index.js CHANGED
@@ -354,10 +354,10 @@ var SMath;
354
354
  if (min < 0) {
355
355
  min--;
356
356
  }
357
- if (max < 0) {
358
- max--;
357
+ if (max > 0) {
358
+ max++;
359
359
  }
360
- return runif(min, max + 1) | 0; // `| 0` pulls toward 0
360
+ return clamp(runif(min, max), min, max) | 0; // `| 0` pulls toward 0
361
361
  }
362
362
  SMath.rint = rint;
363
363
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smath",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "Small math function library",
5
5
  "homepage": "https://npm.nicfv.com/smath",
6
6
  "bin": "dist/bin.js",
@@ -11,10 +11,9 @@
11
11
  "types"
12
12
  ],
13
13
  "scripts": {
14
- "build": "rm -rf dist types && tsc && node dist/test.js && rm dist/test.js",
15
- "test": "tsc --noEmit",
14
+ "build": "rm -rf dist types docs && typedoc --options ../typedoc.json src && node dist/test.js && rm dist/test.js types/test.d.ts",
15
+ "test": "tsc -v && tsc --noEmit",
16
16
  "clean": "rm -rf node_modules package-lock.json dist types docs",
17
- "docs": "rm -rf docs && typedoc --includeVersion --disableSources --hideGenerator --excludePrivate --excludeProtected src",
18
17
  "prepack": "npm run build",
19
18
  "postpack": "rm -rf dist types"
20
19
  },
@@ -59,7 +58,6 @@
59
58
  "devDependencies": {
60
59
  "@types/node": "20.12.7",
61
60
  "exray": "1.0.3",
62
- "typedoc": "0.25.13",
63
- "typescript": "5.4.5"
61
+ "typedoc": "0.25.13"
64
62
  }
65
63
  }
package/types/test.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};