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 +2 -2
- package/dist/index.js +3 -3
- package/package.json +4 -6
- package/types/test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
5
|
-

|
|
6
6
|

|
|
7
7
|

|
|
8
8
|

|
|
@@ -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.
|
|
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
|
|
358
|
-
max
|
|
357
|
+
if (max > 0) {
|
|
358
|
+
max++;
|
|
359
359
|
}
|
|
360
|
-
return runif(min, max
|
|
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.
|
|
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 &&
|
|
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 {};
|