@guillaume-docquier/tools-ts 6.4.0 → 6.5.0
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 +4 -3
- package/dist/entry.tools-ts.d.ts +2 -0
- package/dist/entry.tools-ts.js +2 -0
- package/dist/entry.tools-ts.js.map +1 -1
- package/dist/measurements/Distance.d.ts +61 -0
- package/dist/measurements/Distance.js +95 -0
- package/dist/measurements/Distance.js.map +1 -0
- package/dist/measurements/Point3D.d.ts +50 -0
- package/dist/measurements/Point3D.js +66 -0
- package/dist/measurements/Point3D.js.map +1 -0
- package/dist/measurements/Time.d.ts +4 -4
- package/dist/measurements/Time.js.map +1 -1
- package/dist/rng/rng.js +2 -2
- package/dist/rng/rng.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -122,9 +122,10 @@ Use these helpers for quick profiling.
|
|
|
122
122
|
|
|
123
123
|
### Measurements
|
|
124
124
|
|
|
125
|
-
| Export
|
|
126
|
-
|
|
|
127
|
-
| `Time`
|
|
125
|
+
| Export | What it is | Use it when |
|
|
126
|
+
| ---------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
127
|
+
| `Time` | Represent a time value with a unit and contains conversion methods. | You want to represent time and abstract away the units used. |
|
|
128
|
+
| `Distance` | Represent a distance value with a unit and contains conversion and comparison methods. | You want to represent distances and abstract away the units used. |
|
|
128
129
|
|
|
129
130
|
### Date manipulations
|
|
130
131
|
|
package/dist/entry.tools-ts.d.ts
CHANGED
|
@@ -29,5 +29,7 @@ export { createRng, type Rng, type Generator } from "./rng/rng.js";
|
|
|
29
29
|
export { mulberry32Prng } from "./rng/mulberry32prng.js";
|
|
30
30
|
export { Datetime } from "./Datetime.js";
|
|
31
31
|
export { Time, UnitOfTime } from "./measurements/Time.js";
|
|
32
|
+
export { Distance, UnitOfDistance } from "./measurements/Distance.js";
|
|
33
|
+
export { Point3D } from "./measurements/Point3D.js";
|
|
32
34
|
export { Timer } from "./Timer.js";
|
|
33
35
|
export { type Branded, branded } from "./Brand.js";
|
package/dist/entry.tools-ts.js
CHANGED
|
@@ -24,6 +24,8 @@ export { createRng } from "./rng/rng.js";
|
|
|
24
24
|
export { mulberry32Prng } from "./rng/mulberry32prng.js";
|
|
25
25
|
export { Datetime } from "./Datetime.js";
|
|
26
26
|
export { Time, UnitOfTime } from "./measurements/Time.js";
|
|
27
|
+
export { Distance, UnitOfDistance } from "./measurements/Distance.js";
|
|
28
|
+
export { Point3D } from "./measurements/Point3D.js";
|
|
27
29
|
export { Timer } from "./Timer.js";
|
|
28
30
|
export { branded } from "./Brand.js";
|
|
29
31
|
//# sourceMappingURL=entry.tools-ts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry.tools-ts.js","sourceRoot":"","sources":["../src/entry.tools-ts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAI5C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,MAAM,EAA8B,MAAM,aAAa,CAAA;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM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
import { Point3D } from "./Point3D.js";
|
|
3
|
+
export declare enum UnitOfDistance {
|
|
4
|
+
METERS = "Meters",
|
|
5
|
+
MILLIMETERS = "Millimeters",
|
|
6
|
+
ASTRONOMICAL_UNITS = "Astronomical Units",
|
|
7
|
+
LIGHT_YEARS = "Light Years"
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Represents a distance with its unit
|
|
11
|
+
*/
|
|
12
|
+
export type Distance = Measurement<UnitOfDistance>;
|
|
13
|
+
/**
|
|
14
|
+
* A set of functions to work with Distances.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Distance: {
|
|
17
|
+
/**
|
|
18
|
+
* Creates a distance.
|
|
19
|
+
* @param value The value for the distance.
|
|
20
|
+
* @param unit The unit for the distance.
|
|
21
|
+
*/
|
|
22
|
+
create(value: number, unit: UnitOfDistance): Distance;
|
|
23
|
+
/**
|
|
24
|
+
* Converts a distance to another unit of distance.
|
|
25
|
+
* The provided distance is left untouched.
|
|
26
|
+
* @param distance The distance to convert.
|
|
27
|
+
* @param newUnit The unit to convert to.
|
|
28
|
+
* @returns A new Distance with the requested unit of distance.
|
|
29
|
+
*/
|
|
30
|
+
convert(distance: Readonly<Distance>, newUnit: UnitOfDistance): Distance;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the value of the distance in the given unit of distance.
|
|
33
|
+
* @param distance The distance to get the value of.
|
|
34
|
+
* @param newUnit The unit of distance to get the value of the distance in.
|
|
35
|
+
*/
|
|
36
|
+
in({ value, unit }: Readonly<Distance>, newUnit: UnitOfDistance): number;
|
|
37
|
+
/**
|
|
38
|
+
* Determines if two distances are equal given a certain tolerance.
|
|
39
|
+
* The distances will be converted in the tolerance unit before comparison.
|
|
40
|
+
* @param distance1 The first distance to compare.
|
|
41
|
+
* @param distance2 The second distance to compare.
|
|
42
|
+
* @param tolerance The allowed tolerance.
|
|
43
|
+
*/
|
|
44
|
+
areEqual(distance1: Readonly<Distance>, distance2: Readonly<Distance>, tolerance: Readonly<Distance>): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Computes the squared distance between two positions.
|
|
47
|
+
* @param position1 The first position.
|
|
48
|
+
* @param position2 The second position.
|
|
49
|
+
* @param unitOfReference The unit to use to compare the positions. This unit will also be the unit of the resulting Distance.
|
|
50
|
+
* If not defined, a random unit will be used. Specifying your unit can help mitigate floating point errors.
|
|
51
|
+
*/
|
|
52
|
+
betweenSquared(position1: Readonly<Point3D>, position2: Readonly<Point3D>, unitOfReference?: UnitOfDistance): Distance;
|
|
53
|
+
/**
|
|
54
|
+
* Computes the distance between two positions.
|
|
55
|
+
* @param position1 The first position.
|
|
56
|
+
* @param position2 The second position.
|
|
57
|
+
* @param unitOfReference The unit to use to compare the positions. This unit will also be the unit of the resulting Distance.
|
|
58
|
+
* If not defined, a random unit will be used. Specifying your unit can help mitigate floating point errors.
|
|
59
|
+
*/
|
|
60
|
+
between(position1: Readonly<Point3D>, position2: Readonly<Point3D>, unitOfReference?: UnitOfDistance): Distance;
|
|
61
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Point3D } from "./Point3D.js";
|
|
2
|
+
export var UnitOfDistance;
|
|
3
|
+
(function (UnitOfDistance) {
|
|
4
|
+
UnitOfDistance["METERS"] = "Meters";
|
|
5
|
+
UnitOfDistance["MILLIMETERS"] = "Millimeters";
|
|
6
|
+
UnitOfDistance["ASTRONOMICAL_UNITS"] = "Astronomical Units";
|
|
7
|
+
UnitOfDistance["LIGHT_YEARS"] = "Light Years";
|
|
8
|
+
})(UnitOfDistance || (UnitOfDistance = {}));
|
|
9
|
+
/**
|
|
10
|
+
* The definition of distances in meters.
|
|
11
|
+
* 1 millimeter is 0.001 meters.
|
|
12
|
+
* 1 astronomical unit is 149,597,870,700 meters.
|
|
13
|
+
* 1 light-year is 9,460,730,472,580,800 meters.
|
|
14
|
+
*/
|
|
15
|
+
const METERS_PER_DISTANCE = {
|
|
16
|
+
[UnitOfDistance.MILLIMETERS]: 0.001,
|
|
17
|
+
[UnitOfDistance.METERS]: 1,
|
|
18
|
+
[UnitOfDistance.ASTRONOMICAL_UNITS]: 149_597_870_700,
|
|
19
|
+
[UnitOfDistance.LIGHT_YEARS]: 9_460_730_472_580_800,
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A set of functions to work with Distances.
|
|
23
|
+
*/
|
|
24
|
+
export const Distance = {
|
|
25
|
+
/**
|
|
26
|
+
* Creates a distance.
|
|
27
|
+
* @param value The value for the distance.
|
|
28
|
+
* @param unit The unit for the distance.
|
|
29
|
+
*/
|
|
30
|
+
create(value, unit) {
|
|
31
|
+
return { value, unit };
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* Converts a distance to another unit of distance.
|
|
35
|
+
* The provided distance is left untouched.
|
|
36
|
+
* @param distance The distance to convert.
|
|
37
|
+
* @param newUnit The unit to convert to.
|
|
38
|
+
* @returns A new Distance with the requested unit of distance.
|
|
39
|
+
*/
|
|
40
|
+
convert(distance, newUnit) {
|
|
41
|
+
return {
|
|
42
|
+
value: Distance.in(distance, newUnit),
|
|
43
|
+
unit: newUnit,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* Returns the value of the distance in the given unit of distance.
|
|
48
|
+
* @param distance The distance to get the value of.
|
|
49
|
+
* @param newUnit The unit of distance to get the value of the distance in.
|
|
50
|
+
*/
|
|
51
|
+
in({ value, unit }, newUnit) {
|
|
52
|
+
if (unit === newUnit) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return (value * METERS_PER_DISTANCE[unit]) / METERS_PER_DISTANCE[newUnit];
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Determines if two distances are equal given a certain tolerance.
|
|
59
|
+
* The distances will be converted in the tolerance unit before comparison.
|
|
60
|
+
* @param distance1 The first distance to compare.
|
|
61
|
+
* @param distance2 The second distance to compare.
|
|
62
|
+
* @param tolerance The allowed tolerance.
|
|
63
|
+
*/
|
|
64
|
+
areEqual(distance1, distance2, tolerance) {
|
|
65
|
+
const difference = Distance.in(distance1, tolerance.unit) - Distance.in(distance2, tolerance.unit);
|
|
66
|
+
return Math.abs(difference) <= tolerance.value;
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* Computes the squared distance between two positions.
|
|
70
|
+
* @param position1 The first position.
|
|
71
|
+
* @param position2 The second position.
|
|
72
|
+
* @param unitOfReference The unit to use to compare the positions. This unit will also be the unit of the resulting Distance.
|
|
73
|
+
* If not defined, a random unit will be used. Specifying your unit can help mitigate floating point errors.
|
|
74
|
+
*/
|
|
75
|
+
betweenSquared(position1, position2, unitOfReference) {
|
|
76
|
+
const actualUnitOfReference = unitOfReference ?? position1.x.unit;
|
|
77
|
+
const xyz1 = Point3D.in(position1, actualUnitOfReference);
|
|
78
|
+
const xyz2 = Point3D.in(position2, actualUnitOfReference);
|
|
79
|
+
const distanceValue = Math.pow(xyz1.x - xyz2.x, 2) + Math.pow(xyz1.y - xyz2.y, 2) + Math.pow(xyz1.z - xyz2.z, 2);
|
|
80
|
+
return Distance.create(distanceValue, actualUnitOfReference);
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Computes the distance between two positions.
|
|
84
|
+
* @param position1 The first position.
|
|
85
|
+
* @param position2 The second position.
|
|
86
|
+
* @param unitOfReference The unit to use to compare the positions. This unit will also be the unit of the resulting Distance.
|
|
87
|
+
* If not defined, a random unit will be used. Specifying your unit can help mitigate floating point errors.
|
|
88
|
+
*/
|
|
89
|
+
between(position1, position2, unitOfReference) {
|
|
90
|
+
const distance = Distance.betweenSquared(position1, position2, unitOfReference);
|
|
91
|
+
distance.value = Math.sqrt(distance.value);
|
|
92
|
+
return distance;
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=Distance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Distance.js","sourceRoot":"","sources":["../../src/measurements/Distance.ts"],"names":[],"mappings":"AACA,OA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|
3
|
+
* Represents a position in 3D space
|
|
4
|
+
*/
|
|
5
|
+
export type Point3D = {
|
|
6
|
+
x: Distance;
|
|
7
|
+
y: Distance;
|
|
8
|
+
z: Distance;
|
|
9
|
+
};
|
|
10
|
+
interface XYZ {
|
|
11
|
+
x: Distance["value"];
|
|
12
|
+
y: Distance["value"];
|
|
13
|
+
z: Distance["value"];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A set of functions to work with Positions.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Point3D: {
|
|
19
|
+
/**
|
|
20
|
+
* Builds a position from XYZ with the same unit.
|
|
21
|
+
* @param x The x value
|
|
22
|
+
* @param y The y value
|
|
23
|
+
* @param z The z value
|
|
24
|
+
* @param unit The unit to use for all values
|
|
25
|
+
*/
|
|
26
|
+
create({ x, y, z }: Readonly<XYZ>, unit: UnitOfDistance): Point3D;
|
|
27
|
+
/**
|
|
28
|
+
* Converts x, y, and z to the given unit.
|
|
29
|
+
* The unit can be a UnitOfDistance, or another Position.
|
|
30
|
+
* When the unit is a Position, each value will be converted to the matching Position's unit.
|
|
31
|
+
* @param position The position to convert.
|
|
32
|
+
* @param unit The unit(s) to convert to.
|
|
33
|
+
*/
|
|
34
|
+
convert({ x, y, z }: Readonly<Point3D>, unit: Readonly<Point3D> | UnitOfDistance): Point3D;
|
|
35
|
+
/**
|
|
36
|
+
* Converts x, y, and z to the given unit and returns the values
|
|
37
|
+
* @param position The position to convert.
|
|
38
|
+
* @param newUnit The new unit to convert to.
|
|
39
|
+
*/
|
|
40
|
+
in({ x, y, z }: Readonly<Point3D>, newUnit: UnitOfDistance): XYZ;
|
|
41
|
+
/**
|
|
42
|
+
* Determines if two positions are equal given a certain tolerance.
|
|
43
|
+
* The positions will be converted in the tolerance unit before comparison.
|
|
44
|
+
* @param position1 The first position to compare.
|
|
45
|
+
* @param position2 The second position to compare.
|
|
46
|
+
* @param tolerance The allowed tolerance.
|
|
47
|
+
*/
|
|
48
|
+
areEqual(position1: Readonly<Point3D>, position2: Readonly<Point3D>, tolerance: Readonly<Distance>): boolean;
|
|
49
|
+
};
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { TypeGuard } from "../TypeGuard.js";
|
|
2
|
+
import { Distance, UnitOfDistance } from "./Distance.js";
|
|
3
|
+
/**
|
|
4
|
+
* A set of functions to work with Positions.
|
|
5
|
+
*/
|
|
6
|
+
export const Point3D = {
|
|
7
|
+
/**
|
|
8
|
+
* Builds a position from XYZ with the same unit.
|
|
9
|
+
* @param x The x value
|
|
10
|
+
* @param y The y value
|
|
11
|
+
* @param z The z value
|
|
12
|
+
* @param unit The unit to use for all values
|
|
13
|
+
*/
|
|
14
|
+
create({ x, y, z }, unit) {
|
|
15
|
+
return {
|
|
16
|
+
x: { value: x, unit },
|
|
17
|
+
y: { value: y, unit },
|
|
18
|
+
z: { value: z, unit },
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* Converts x, y, and z to the given unit.
|
|
23
|
+
* The unit can be a UnitOfDistance, or another Position.
|
|
24
|
+
* When the unit is a Position, each value will be converted to the matching Position's unit.
|
|
25
|
+
* @param position The position to convert.
|
|
26
|
+
* @param unit The unit(s) to convert to.
|
|
27
|
+
*/
|
|
28
|
+
convert({ x, y, z }, unit) {
|
|
29
|
+
if (TypeGuard.isEnumMember(UnitOfDistance, unit)) {
|
|
30
|
+
return {
|
|
31
|
+
x: Distance.convert(x, unit),
|
|
32
|
+
y: Distance.convert(y, unit),
|
|
33
|
+
z: Distance.convert(z, unit),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
x: Distance.convert(x, unit.x.unit),
|
|
38
|
+
y: Distance.convert(y, unit.y.unit),
|
|
39
|
+
z: Distance.convert(z, unit.z.unit),
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Converts x, y, and z to the given unit and returns the values
|
|
44
|
+
* @param position The position to convert.
|
|
45
|
+
* @param newUnit The new unit to convert to.
|
|
46
|
+
*/
|
|
47
|
+
in({ x, y, z }, newUnit) {
|
|
48
|
+
return {
|
|
49
|
+
x: Distance.in(x, newUnit),
|
|
50
|
+
y: Distance.in(y, newUnit),
|
|
51
|
+
z: Distance.in(z, newUnit),
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* Determines if two positions are equal given a certain tolerance.
|
|
56
|
+
* The positions will be converted in the tolerance unit before comparison.
|
|
57
|
+
* @param position1 The first position to compare.
|
|
58
|
+
* @param position2 The second position to compare.
|
|
59
|
+
* @param tolerance The allowed tolerance.
|
|
60
|
+
*/
|
|
61
|
+
areEqual(position1, position2, tolerance) {
|
|
62
|
+
const distance = Distance.between(position1, position2, tolerance.unit);
|
|
63
|
+
return Math.abs(distance.value) <= tolerance.value;
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=Point3D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Point3D.js","sourceRoot":"","sources":["../../src/measurements/Point3D.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAiBxD;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAiB,EAAE,IAAoB;QACrD,OAAO;YACL,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE;YACrB,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE;YACrB,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE;SACtB,CAAA;IACH,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,CAAC,EAAE,CAA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,CAAC,KAAK,CAAA;IACpD,CAAC;CACF,CAAA"}
|
|
@@ -24,19 +24,19 @@ export declare const Time: {
|
|
|
24
24
|
* @param newUnit The new unit to convert to.
|
|
25
25
|
* @returns A new Time with the requested unit of time.
|
|
26
26
|
*/
|
|
27
|
-
convert(time: Time
|
|
27
|
+
convert(time: Readonly<Time>, newUnit: UnitOfTime): Time;
|
|
28
28
|
/**
|
|
29
29
|
* Returns the value of the time in the given unit of time.
|
|
30
30
|
* @param time The time to get the value of.
|
|
31
31
|
* @param newUnit The unit of time to get the value of the time in.
|
|
32
32
|
*/
|
|
33
|
-
in(time: Time
|
|
33
|
+
in(time: Readonly<Time>, newUnit: UnitOfTime): number;
|
|
34
34
|
/**
|
|
35
35
|
* Adds 2 times together. The unit of the first time will be used.
|
|
36
36
|
*/
|
|
37
|
-
add(timeA: Time
|
|
37
|
+
add(timeA: Readonly<Time>, timeB: Readonly<Time>): Time;
|
|
38
38
|
/**
|
|
39
39
|
* Subtracts 2 times. The unit of the first time will be used.
|
|
40
40
|
*/
|
|
41
|
-
subtract(timeA: Time
|
|
41
|
+
subtract(timeA: Readonly<Time>, timeB: Readonly<Time>): Time;
|
|
42
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Time.js","sourceRoot":"","sources":["../../src/measurements/Time.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,2CAA6B,CAAA;IAC7B,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,6BAAe,CAAA;AACjB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB;AAED;;;GAGG;AACH,MAAM,gBAAgB,GAA+B;IACnD,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,IAAI;IAC/B,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;IACvB,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE;IAC5B,CAAC,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KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/E,CAAC;IAED;;OAEG;IACH,GAAG,CAAC,KAAqB,EAAE,KAAqB;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAC1E,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,KAAqB,EAAE,KAAqB;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAC1E,CAAC;CACF,CAAA"}
|
package/dist/rng/rng.js
CHANGED
|
@@ -56,7 +56,7 @@ export function createRng(generator) {
|
|
|
56
56
|
if (spareNormal !== undefined) {
|
|
57
57
|
const value = spareNormal;
|
|
58
58
|
spareNormal = undefined;
|
|
59
|
-
return value;
|
|
59
|
+
return mean + std * value;
|
|
60
60
|
}
|
|
61
61
|
// u1 must be non-zero
|
|
62
62
|
let u1;
|
|
@@ -64,7 +64,7 @@ export function createRng(generator) {
|
|
|
64
64
|
u1 = generator();
|
|
65
65
|
} while (u1 === 0);
|
|
66
66
|
const { z1, z2 } = boxMullerSample(u1, generator());
|
|
67
|
-
spareNormal =
|
|
67
|
+
spareNormal = z1;
|
|
68
68
|
return mean + std * z2;
|
|
69
69
|
}
|
|
70
70
|
return {
|
package/dist/rng/rng.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rng.js","sourceRoot":"","sources":["../../src/rng/rng.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AA4CtD,MAAM,eAAe,GAAG;IACtB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,EAAE,CAAC;YAC9B,MAAM,KAAK,GAAG,WAAW,CAAA;YACzB,WAAW,GAAG,SAAS,CAAA;YACvB,OAAO,IAAI,GAAG,GAAG,GAAG,KAAK,CAAA;QAC3B,CAAC;QAED,sBAAsB;QACtB,IAAI,EAAE,CAAA;QACN,GAAG,CAAC;YACF,EAAE,GAAG,SAAS,EAAE,CAAA;QAClB,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAC;QAElB,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,eAAe,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,CAAA;QAEnD,WAAW,GAAG,EAAE,CAAA;QAChB,OAAO,IAAI,GAAG,GAAG,GAAG,EAAE,CAAA;IACxB,CAAC;IAED,OAAO;QACL,MAAM;QACN,KAAK;QACL,GAAG;QACH,OAAO;QACP,IAAI;QACJ,MAAM;KACP,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guillaume-docquier/tools-ts",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"description": "My personal collection of typescript tools",
|
|
5
5
|
"homepage": "https://github.com/Guillaume-Docquier/tools-ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"husky": "^9.1.7",
|
|
41
41
|
"jiti": "^2.7.0",
|
|
42
42
|
"lint-staged": "^16.4.0",
|
|
43
|
-
"oxfmt": ">=0.
|
|
44
|
-
"oxlint": "^1.
|
|
43
|
+
"oxfmt": ">=0.62.0",
|
|
44
|
+
"oxlint": "^1.77.0",
|
|
45
45
|
"oxlint-tsgolint": "^7.0.2001",
|
|
46
|
-
"semantic-release": "^25.0.
|
|
46
|
+
"semantic-release": "^25.0.9",
|
|
47
47
|
"typescript": "~7.0.2",
|
|
48
48
|
"vite": "^8.2.0",
|
|
49
49
|
"vitest": "^4.1.10",
|