@thi.ng/geom-closest-point 2.1.167 → 2.1.169
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 +7 -1
- package/README.md +1 -1
- package/box.d.ts +2 -2
- package/circle.d.ts +3 -3
- package/circle.js +4 -4
- package/line.d.ts +2 -2
- package/package.json +7 -7
- package/plane.d.ts +1 -1
- package/points.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-04-
|
|
3
|
+
- **Last updated**: 2025-04-16T11:11:14Z
|
|
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.
|
|
@@ -11,6 +11,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
11
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
12
|
and/or version bumps of transitive dependencies.
|
|
13
13
|
|
|
14
|
+
### [2.1.169](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-closest-point@2.1.169) (2025-04-16)
|
|
15
|
+
|
|
16
|
+
#### ♻️ Refactoring
|
|
17
|
+
|
|
18
|
+
- minor internal optimizations (vector ops) ([664225e](https://github.com/thi-ng/umbrella/commit/664225e))
|
|
19
|
+
|
|
14
20
|
### [2.1.128](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-closest-point@2.1.128) (2024-06-21)
|
|
15
21
|
|
|
16
22
|
#### ♻️ Refactoring
|
package/README.md
CHANGED
package/box.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
2
|
-
export declare const closestPointRect: (p: ReadonlyVec, bmin: ReadonlyVec, bmax: ReadonlyVec, out?: Vec) => Vec
|
|
3
|
-
export declare const closestPointAABB: (p: ReadonlyVec, bmin: ReadonlyVec, bmax: ReadonlyVec, out?: Vec) => Vec
|
|
2
|
+
export declare const closestPointRect: (p: ReadonlyVec, bmin: ReadonlyVec, bmax: ReadonlyVec, out?: Vec) => Vec<number>;
|
|
3
|
+
export declare const closestPointAABB: (p: ReadonlyVec, bmin: ReadonlyVec, bmax: ReadonlyVec, out?: Vec) => Vec<number>;
|
|
4
4
|
//# sourceMappingURL=box.d.ts.map
|
package/circle.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
|
7
7
|
* @param r -
|
|
8
8
|
* @param out -
|
|
9
9
|
*/
|
|
10
|
-
export declare const closestPointCircle: (p: ReadonlyVec, c: ReadonlyVec, r: number, out?: Vec) => Vec
|
|
10
|
+
export declare const closestPointCircle: (p: ReadonlyVec, c: ReadonlyVec, r: number, out?: Vec) => Vec<number>;
|
|
11
11
|
/**
|
|
12
|
-
* Same as {@link closestPointCircle}.
|
|
12
|
+
* Same as {@link closestPointCircle}, but for 3D.
|
|
13
13
|
*/
|
|
14
|
-
export declare const closestPointSphere: (p: ReadonlyVec, c: ReadonlyVec, r: number, out?: Vec) => Vec
|
|
14
|
+
export declare const closestPointSphere: (p: ReadonlyVec, c: ReadonlyVec, r: number, out?: Vec) => Vec<number>;
|
|
15
15
|
//# sourceMappingURL=circle.d.ts.map
|
package/circle.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const closestPointCircle = (p, c, r, out = []) =>
|
|
4
|
-
const closestPointSphere =
|
|
1
|
+
import { add2, add3 } from "@thi.ng/vectors/add";
|
|
2
|
+
import { direction2, direction3 } from "@thi.ng/vectors/direction";
|
|
3
|
+
const closestPointCircle = (p, c, r, out = []) => add2(out, c, direction2(out, c, p, r));
|
|
4
|
+
const closestPointSphere = (p, c, r, out = []) => add3(out, c, direction3(out, c, p, r));
|
|
5
5
|
export {
|
|
6
6
|
closestPointCircle,
|
|
7
7
|
closestPointSphere
|
package/line.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ export declare const distToLine: FnU3<ReadonlyVec, number>;
|
|
|
71
71
|
* @param out - result
|
|
72
72
|
* @param eps - epsilon value
|
|
73
73
|
*/
|
|
74
|
-
export declare const closestPointSegment: (p: ReadonlyVec, a: ReadonlyVec, b: ReadonlyVec, out?: Vec, insideOnly?: boolean, eps?: number) => Vec | undefined;
|
|
74
|
+
export declare const closestPointSegment: (p: ReadonlyVec, a: ReadonlyVec, b: ReadonlyVec, out?: Vec, insideOnly?: boolean, eps?: number) => Vec<number> | undefined;
|
|
75
75
|
/**
|
|
76
76
|
* Returns distance from `p` to closest point on line segment `a` ->
|
|
77
77
|
* `b`.
|
|
@@ -81,7 +81,7 @@ export declare const closestPointSegment: (p: ReadonlyVec, a: ReadonlyVec, b: Re
|
|
|
81
81
|
* @param b - line point B
|
|
82
82
|
*/
|
|
83
83
|
export declare const distToSegment: FnU3<ReadonlyVec, number>;
|
|
84
|
-
export declare const closestPointPolyline: (p: ReadonlyVec, pts: ReadonlyArray<Vec>, closed?: boolean, out?: Vec) => Vec | undefined;
|
|
84
|
+
export declare const closestPointPolyline: (p: ReadonlyVec, pts: ReadonlyArray<Vec>, closed?: boolean, out?: Vec) => Vec<number> | undefined;
|
|
85
85
|
/**
|
|
86
86
|
* Returns the index of the start point containing the segment in the
|
|
87
87
|
* polyline array `points` farthest away from `p` with regards to the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/geom-closest-point",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.169",
|
|
4
4
|
"description": "2D / 3D closest point / proximity helpers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.11.
|
|
43
|
-
"@thi.ng/math": "^5.11.
|
|
44
|
-
"@thi.ng/vectors": "^
|
|
42
|
+
"@thi.ng/api": "^8.11.26",
|
|
43
|
+
"@thi.ng/math": "^5.11.26",
|
|
44
|
+
"@thi.ng/vectors": "^8.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"esbuild": "^0.25.2",
|
|
48
|
-
"typedoc": "^0.28.
|
|
49
|
-
"typescript": "^5.8.
|
|
48
|
+
"typedoc": "^0.28.2",
|
|
49
|
+
"typescript": "^5.8.3"
|
|
50
50
|
},
|
|
51
51
|
"keywords": [
|
|
52
52
|
"2d",
|
|
@@ -105,5 +105,5 @@
|
|
|
105
105
|
],
|
|
106
106
|
"year": 2018
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "c464b6948f92cba90c2ea75b59203dad894fb450\n"
|
|
109
109
|
}
|
package/plane.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ export declare const distToPlane: (p: ReadonlyVec, n: ReadonlyVec, w: number) =>
|
|
|
21
21
|
* @param w -
|
|
22
22
|
* @param out -
|
|
23
23
|
*/
|
|
24
|
-
export declare const closestPointPlane: (p: ReadonlyVec, normal: ReadonlyVec, w: number, out?: Vec) => Vec
|
|
24
|
+
export declare const closestPointPlane: (p: ReadonlyVec, normal: ReadonlyVec, w: number, out?: Vec) => Vec<number>;
|
|
25
25
|
//# sourceMappingURL=plane.d.ts.map
|
package/points.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
|
|
|
10
10
|
* @param out -
|
|
11
11
|
* @param dist -
|
|
12
12
|
*/
|
|
13
|
-
export declare const closestPointArray: (p: ReadonlyVec, pts: Vec[], out?: Vec, dist?: FnU2<ReadonlyVec, number>) => Vec | undefined;
|
|
13
|
+
export declare const closestPointArray: (p: ReadonlyVec, pts: Vec[], out?: Vec, dist?: FnU2<ReadonlyVec, number>) => Vec<number> | undefined;
|
|
14
14
|
//# sourceMappingURL=points.d.ts.map
|