pimath 0.0.90 → 0.0.91
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/.idea/php.xml +15 -0
- package/dist/pi.js +15 -0
- 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 +5 -0
- package/esm/maths/geometry/line.js +15 -0
- package/esm/maths/geometry/line.js.map +1 -1
- package/package.json +1 -1
- package/src/maths/geometry/line.ts +18 -0
- package/tests/algebra/equation.test.ts +6 -0
- package/dev/pi.js +0 -7589
- package/dev/pi.js.map +0 -1
package/.idea/php.xml
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project version="4">
|
|
3
|
+
<component name="MessDetectorOptionsConfiguration">
|
|
4
|
+
<option name="transferred" value="true" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="PHPCSFixerOptionsConfiguration">
|
|
7
|
+
<option name="transferred" value="true" />
|
|
8
|
+
</component>
|
|
9
|
+
<component name="PHPCodeSnifferOptionsConfiguration">
|
|
10
|
+
<option name="transferred" value="true" />
|
|
11
|
+
</component>
|
|
3
12
|
<component name="PhpProjectSharedConfiguration" php_language_level="8.1" />
|
|
13
|
+
<component name="PhpStanOptionsConfiguration">
|
|
14
|
+
<option name="transferred" value="true" />
|
|
15
|
+
</component>
|
|
16
|
+
<component name="PsalmOptionsConfiguration">
|
|
17
|
+
<option name="transferred" value="true" />
|
|
18
|
+
</component>
|
|
4
19
|
</project>
|
package/dist/pi.js
CHANGED
|
@@ -5734,6 +5734,21 @@ class Line {
|
|
|
5734
5734
|
parametric: `${point_1.Point.pmatrix('x', 'y')} = ${point_1.Point.pmatrix(this._OA.x, this._OA.y)} + k\\cdot ${point_1.Point.pmatrix(this._d.x, this._d.y)}`
|
|
5735
5735
|
};
|
|
5736
5736
|
}
|
|
5737
|
+
get display() {
|
|
5738
|
+
// canonical => ax + by + c = 0
|
|
5739
|
+
// mxh => y = -a/b x - c/b
|
|
5740
|
+
// parametric => (xy) = OA + k*d // not relevant in display mode.
|
|
5741
|
+
let canonical = this.equation;
|
|
5742
|
+
// Make sur the first item is positive.
|
|
5743
|
+
if (this._a.isNegative()) {
|
|
5744
|
+
canonical.multiply(-1);
|
|
5745
|
+
}
|
|
5746
|
+
return {
|
|
5747
|
+
canonical: canonical.display,
|
|
5748
|
+
mxh: this.slope.isInfinity() ? 'x=' + this.OA.x.display : 'y=' + new polynom_1.Polynom().parse('x', this.slope, this.height).display,
|
|
5749
|
+
parametric: ""
|
|
5750
|
+
};
|
|
5751
|
+
}
|
|
5737
5752
|
get a() {
|
|
5738
5753
|
return this._a;
|
|
5739
5754
|
}
|