plotboilerplate 1.29.0 → 1.30.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.
@@ -17,13 +17,15 @@
17
17
  * @modified 2025-04-15 Changed param of `VertTuple.moveTo` method from `Vertex` to `XYCoords`.
18
18
  * @modified 2025-04-15 Added method `VertTuple.move` method.
19
19
  * @modified 2026-06-10 Adding helper function `VertTuple.utils.calcCircumcircle`.
20
- * @version 1.5.0
20
+ * @modified 2026-06-17 Adding method `VertTuple.asLine` for converting Vector to Line instances.
21
+ * @version 1.6.0
21
22
  */
22
23
 
23
24
  import { Vertex } from "./Vertex";
24
25
  import { UIDGenerator } from "./UIDGenerator";
25
26
  import { XYCoords, UID } from "./interfaces";
26
27
  import { ICircle } from "./Circle";
28
+ import { Line } from "./Line";
27
29
 
28
30
  /**
29
31
  * @classdesc An abstract base classes for vertex tuple constructs, like Lines or Vectors.
@@ -360,7 +362,7 @@ export class VertTuple<T extends VertTuple<T>> {
360
362
  /**
361
363
  * Create a deep clone of this instance.
362
364
  *
363
- * @method cloneLine
365
+ * @method clone
364
366
  * @return {T} A type safe clone if this instance.
365
367
  * @instance
366
368
  * @memberof VertTuple
@@ -369,6 +371,18 @@ export class VertTuple<T extends VertTuple<T>> {
369
371
  return this.factory(this.a.clone(), this.b.clone());
370
372
  }
371
373
 
374
+ /**
375
+ * Converts this `Vector` to a `Line` (segment).
376
+ *
377
+ * @method asLine
378
+ * @return {T} A type safe clone if this instance.
379
+ * @instance
380
+ * @memberof VertTuple
381
+ **/
382
+ asLine(): Line {
383
+ return new Line(this.a, this.b);
384
+ }
385
+
372
386
  /**
373
387
  * Create a string representation of this line.
374
388
  *