@xort/cga 0.0.87 → 0.0.88

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.
@@ -20,6 +20,7 @@ var Line = /** @class */ (function () {
20
20
  Line.prototype.set = function (origin, end) {
21
21
  this.origin.copy(origin);
22
22
  this.end.copy(end);
23
+ this.direction.subVecs(end, origin).normalize();
23
24
  return this;
24
25
  };
25
26
  Line.prototype.distancePoint = function (pt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xort/cga",
3
- "version": "0.0.87",
3
+ "version": "0.0.88",
4
4
  "description": "Xtor Compute Geometry Algorithm Libary 计算几何算法库",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,7 @@ export class Line {
22
22
  set(origin: Vec3, end: Vec3) {
23
23
  this.origin.copy(origin)
24
24
  this.end.copy(end);
25
-
25
+ this.direction.subVecs(end, origin).normalize();
26
26
  return this;
27
27
  }
28
28