@ue-too/curve 0.9.5 → 0.11.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/line.d.ts CHANGED
@@ -1,4 +1,33 @@
1
1
  import { Point } from "@ue-too/math";
2
+ /**
3
+ * Line segment class with geometric utilities.
4
+ *
5
+ * @remarks
6
+ * Represents a straight line segment between two points with operations for:
7
+ * - Line-line intersection
8
+ * - Point projection onto line
9
+ * - Point-in-line testing
10
+ * - Linear interpolation (lerp)
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * const line = new Line({ x: 0, y: 0 }, { x: 100, y: 100 });
15
+ *
16
+ * // Get length
17
+ * console.log('Length:', line.length());
18
+ *
19
+ * // Interpolate at midpoint
20
+ * const mid = line.lerp(0.5); // { x: 50, y: 50 }
21
+ *
22
+ * // Project a point onto the line
23
+ * const result = line.projectPoint({ x: 50, y: 0 });
24
+ * if (result.within) {
25
+ * console.log('Projection:', result.projectionPoint);
26
+ * }
27
+ * ```
28
+ *
29
+ * @category Core
30
+ */
2
31
  export declare class Line {
3
32
  private startPoint;
4
33
  private endPoint;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ue-too/curve",
3
3
  "type": "module",
4
- "version": "0.9.5",
4
+ "version": "0.11.0",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "ts-node": "^10.9.2"
26
26
  },
27
27
  "dependencies": {
28
- "@ue-too/math": "^0.9.5"
28
+ "@ue-too/math": "^0.11.0"
29
29
  },
30
30
  "main": "./index.js",
31
31
  "types": "./index.d.ts",
package/path.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { Line } from "./line";
2
2
  import { Point } from "@ue-too/math";
3
+ /**
4
+ * Path made of sequential line segments.
5
+ * @category Core
6
+ */
3
7
  export declare class Path {
4
8
  private lines;
5
9
  constructor(lines: Line[]);