pimath 0.0.114 → 0.0.115
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/dist/pi.js +5 -2
- package/dist/pi.js.map +1 -1
- package/dist/pi.min.js +1 -1
- package/dist/pi.min.js.map +1 -1
- package/esm/maths/geometry/line.d.ts +2 -1
- package/esm/maths/geometry/line.js +5 -2
- package/esm/maths/geometry/line.js.map +1 -1
- package/package.json +1 -1
- package/src/maths/geometry/line.ts +5 -2
package/dist/pi.js
CHANGED
|
@@ -5947,13 +5947,16 @@ class Line {
|
|
|
5947
5947
|
.add(this._c)
|
|
5948
5948
|
.isZero();
|
|
5949
5949
|
};
|
|
5950
|
-
this.
|
|
5950
|
+
this.isParallelTo = (line) => {
|
|
5951
5951
|
// Do they have the isSame direction ?
|
|
5952
5952
|
return this.slope.isEqual(line.slope) && this.height.isNotEqual(line.height);
|
|
5953
5953
|
};
|
|
5954
5954
|
this.isSameAs = (line) => {
|
|
5955
5955
|
return this.slope.isEqual(line.slope) && this.height.isEqual(line.height);
|
|
5956
5956
|
};
|
|
5957
|
+
this.isPerpendicularTo = (line) => {
|
|
5958
|
+
return this.d.isNormalTo(line.d);
|
|
5959
|
+
};
|
|
5957
5960
|
this.isVertical = () => {
|
|
5958
5961
|
return this.slope.isInfinity();
|
|
5959
5962
|
};
|
|
@@ -5985,7 +5988,7 @@ class Line {
|
|
|
5985
5988
|
if (this._b.isZero() || line.b.isZero()) {
|
|
5986
5989
|
// TODO : handle no y in the line canonical form
|
|
5987
5990
|
}
|
|
5988
|
-
if (this.
|
|
5991
|
+
if (this.isParallelTo(line)) {
|
|
5989
5992
|
Pt.x = null;
|
|
5990
5993
|
Pt.y = null;
|
|
5991
5994
|
isParallel = true;
|