@thi.ng/geom-clip-line 2.2.1 → 2.2.3

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**: 2022-12-16T12:52:25Z
3
+ - **Last updated**: 2022-12-22T21:47:07Z
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.
package/README.md CHANGED
@@ -20,7 +20,7 @@ This project is part of the
20
20
 
21
21
  ## About
22
22
 
23
- 2D line clipping (Liang-Barsky)
23
+ 2D line clipping (Liang-Barsky). This is a support package for [@thi.ng/geom](https://github.com/thi-ng/umbrella/tree/develop/packages/geom).
24
24
 
25
25
  Current implementation is based on [toxiclibs](http://toxiclibs.org)
26
26
  (Java) and Clojure version [thi.ng/geom-clj](http://thi.ng/geom-clj).
package/liang-barsky.d.ts CHANGED
@@ -1,17 +1,16 @@
1
1
  import type { FnU8, Tuple } from "@thi.ng/api";
2
2
  import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
3
3
  /**
4
- * Performs Liang-Barsky clipping of the line segment with endpoints
5
- * `a`, `b` against the clipping rect defined by `min` and `max`. The
6
- * optional `ca` and `cb` vectors can be given to store the result
7
- * (clipped points). If omitted creates new vectors. Returns a tuple of
8
- * `[ca, cb, a, b]`, where the latter two values represent the
9
- * normalized distances of the clipped points relative to original given
10
- * line segment. Returns `undefined` iff the line lies completely
11
- * outside the rect.
4
+ * Performs Liang-Barsky clipping of the line segment with endpoints `a`, `b`
5
+ * against the clipping rect defined by `min` and `max`. The optional `ca` and
6
+ * `cb` vectors can be given to store the result (clipped points). If omitted
7
+ * creates new vectors. Returns a tuple of `[ca, cb, a, b]`, where the latter
8
+ * two values represent the normalized distances of the clipped points relative
9
+ * to original given line segment. Returns `undefined` iff the line lies
10
+ * completely outside the rect.
12
11
  *
13
- * - {@link https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm}
14
- * - {@link https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c}
12
+ * - https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm
13
+ * - https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c
15
14
  *
16
15
  * @param a - line endpoint
17
16
  * @param b - line endpoint
package/liang-barsky.js CHANGED
@@ -1,15 +1,14 @@
1
1
  /**
2
- * Performs Liang-Barsky clipping of the line segment with endpoints
3
- * `a`, `b` against the clipping rect defined by `min` and `max`. The
4
- * optional `ca` and `cb` vectors can be given to store the result
5
- * (clipped points). If omitted creates new vectors. Returns a tuple of
6
- * `[ca, cb, a, b]`, where the latter two values represent the
7
- * normalized distances of the clipped points relative to original given
8
- * line segment. Returns `undefined` iff the line lies completely
9
- * outside the rect.
2
+ * Performs Liang-Barsky clipping of the line segment with endpoints `a`, `b`
3
+ * against the clipping rect defined by `min` and `max`. The optional `ca` and
4
+ * `cb` vectors can be given to store the result (clipped points). If omitted
5
+ * creates new vectors. Returns a tuple of `[ca, cb, a, b]`, where the latter
6
+ * two values represent the normalized distances of the clipped points relative
7
+ * to original given line segment. Returns `undefined` iff the line lies
8
+ * completely outside the rect.
10
9
  *
11
- * - {@link https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm}
12
- * - {@link https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c}
10
+ * - https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm
11
+ * - https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c
13
12
  *
14
13
  * @param a - line endpoint
15
14
  * @param b - line endpoint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/geom-clip-line",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "2D line clipping (Liang-Barsky)",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,13 +34,13 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.6.0",
38
- "@thi.ng/geom-isec": "^2.1.38",
39
- "@thi.ng/vectors": "^7.5.27"
37
+ "@thi.ng/api": "^8.6.2",
38
+ "@thi.ng/geom-isec": "^2.1.40",
39
+ "@thi.ng/vectors": "^7.5.29"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@microsoft/api-extractor": "^7.33.7",
43
- "@thi.ng/testament": "^0.3.7",
43
+ "@thi.ng/testament": "^0.3.8",
44
44
  "rimraf": "^3.0.2",
45
45
  "tools": "^0.0.1",
46
46
  "typedoc": "^0.23.22",
@@ -84,5 +84,5 @@
84
84
  ],
85
85
  "year": 2013
86
86
  },
87
- "gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
87
+ "gitHead": "bc6f7f5e2765bb96fe64db804eaf4b2443b47fc6\n"
88
88
  }