pimath 0.0.16 → 0.0.20
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/dev/index.html +39 -9
- package/dev/pi.js +883 -806
- package/dev/pi.js.map +1 -1
- package/dist/pi.js +1 -1
- package/dist/pi.js.map +1 -1
- package/esm/main.js +24 -22
- package/esm/main.js.map +1 -1
- package/esm/maths/algebra/equation.d.ts +3 -1
- package/esm/maths/algebra/equation.js +32 -25
- package/esm/maths/algebra/equation.js.map +1 -1
- package/esm/maths/algebra/index.js +18 -6
- package/esm/maths/algebra/index.js.map +1 -1
- package/esm/maths/algebra/linearSystem.d.ts +1 -1
- package/esm/maths/algebra/linearSystem.js +19 -15
- package/esm/maths/algebra/linearSystem.js.map +1 -1
- package/esm/maths/algebra/logicalset.js +7 -3
- package/esm/maths/algebra/logicalset.js.map +1 -1
- package/esm/maths/algebra/monom.d.ts +15 -18
- package/esm/maths/algebra/monom.js +182 -84
- package/esm/maths/algebra/monom.js.map +1 -1
- package/esm/maths/algebra/polynom.d.ts +5 -26
- package/esm/maths/algebra/polynom.js +64 -220
- package/esm/maths/algebra/polynom.js.map +1 -1
- package/esm/maths/algebra/rational.js +15 -10
- package/esm/maths/algebra/rational.js.map +1 -1
- package/esm/maths/coefficients/fraction.d.ts +20 -10
- package/esm/maths/coefficients/fraction.js +83 -15
- package/esm/maths/coefficients/fraction.js.map +1 -1
- package/esm/maths/coefficients/index.js +14 -2
- package/esm/maths/coefficients/index.js.map +1 -1
- package/esm/maths/coefficients/nthroot.js +5 -1
- package/esm/maths/coefficients/nthroot.js.map +1 -1
- package/esm/maths/geometry/circle.d.ts +16 -1
- package/esm/maths/geometry/circle.js +95 -14
- package/esm/maths/geometry/circle.js.map +1 -1
- package/esm/maths/geometry/index.js +17 -5
- package/esm/maths/geometry/index.js.map +1 -1
- package/esm/maths/geometry/line.d.ts +20 -4
- package/esm/maths/geometry/line.js +123 -49
- package/esm/maths/geometry/line.js.map +1 -1
- package/esm/maths/geometry/point.d.ts +1 -0
- package/esm/maths/geometry/point.js +22 -12
- package/esm/maths/geometry/point.js.map +1 -1
- package/esm/maths/geometry/triangle.js +31 -27
- package/esm/maths/geometry/triangle.js.map +1 -1
- package/esm/maths/geometry/vector.d.ts +0 -1
- package/esm/maths/geometry/vector.js +22 -21
- package/esm/maths/geometry/vector.js.map +1 -1
- package/esm/maths/numeric.js +5 -1
- package/esm/maths/numeric.js.map +1 -1
- package/esm/maths/random/index.d.ts +3 -1
- package/esm/maths/random/index.js +32 -14
- package/esm/maths/random/index.js.map +1 -1
- package/esm/maths/random/randomCore.js +5 -1
- package/esm/maths/random/randomCore.js.map +1 -1
- package/esm/maths/random/rndFraction.d.ts +9 -0
- package/esm/maths/random/rndFraction.js +30 -0
- package/esm/maths/random/rndFraction.js.map +1 -0
- package/esm/maths/random/rndHelpers.js +5 -1
- package/esm/maths/random/rndHelpers.js.map +1 -1
- package/esm/maths/random/rndMonom.d.ts +2 -2
- package/esm/maths/random/rndMonom.js +15 -8
- package/esm/maths/random/rndMonom.js.map +1 -1
- package/esm/maths/random/rndPolynom.js +14 -11
- package/esm/maths/random/rndPolynom.js.map +1 -1
- package/esm/maths/random/rndTypes.d.ts +5 -0
- package/esm/maths/random/rndTypes.js +2 -1
- package/esm/maths/shutingyard.js +5 -1
- package/esm/maths/shutingyard.js.map +1 -1
- package/package.json +5 -5
- package/src/maths/algebra/equation.ts +13 -7
- package/src/maths/algebra/linearSystem.ts +3 -3
- package/src/maths/algebra/monom.ts +764 -612
- package/src/maths/algebra/monom_bck.backup +746 -0
- package/src/maths/algebra/polynom.ts +977 -1174
- package/src/maths/algebra/rational.ts +6 -6
- package/src/maths/coefficients/fraction.ts +98 -27
- package/src/maths/geometry/circle.ts +133 -21
- package/src/maths/geometry/line.ts +162 -58
- package/src/maths/geometry/point.ts +9 -0
- package/src/maths/geometry/vector.ts +1 -5
- package/src/maths/random/index.ts +7 -1
- package/src/maths/random/rndFraction.ts +37 -0
- package/src/maths/random/rndMonom.ts +6 -3
- package/src/maths/random/rndPolynom.ts +0 -1
- package/src/maths/random/rndTypes.ts +5 -0
- package/src/maths/shutingyard.ts +2 -0
- package/tests/algebra/monom.test.ts +47 -8
- package/tests/algebra/polynom.test.ts +13 -22
- package/tests/coefficients/fraction.test.ts +35 -38
- package/tests/shutingyard.test.ts +0 -1
- package/tsconfig.json +2 -2
- package/tsconfig.testing.json +28 -0
package/dev/index.html
CHANGED
|
@@ -16,15 +16,45 @@
|
|
|
16
16
|
<div id="equation"></div>
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
<script
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
<script>
|
|
20
|
+
|
|
21
|
+
let C1 = new Pi.Geometry.Point(-5, 4),
|
|
22
|
+
r1 = 36,
|
|
23
|
+
C2 = new Pi.Geometry.Point(7, -2),
|
|
24
|
+
T = new Pi.Geometry.Point(2, 3)
|
|
25
|
+
|
|
26
|
+
let G1 = new Pi.Geometry.Circle(C1, r1, true),
|
|
27
|
+
G2 = new Pi.Geometry.Circle(C2, T)
|
|
28
|
+
|
|
29
|
+
console.log('G1', G1.tex)
|
|
30
|
+
console.log('G2', G2.tex)
|
|
31
|
+
|
|
32
|
+
let t = new Pi.Geometry.Line(
|
|
33
|
+
new Pi.Geometry.Vector(C2, T),
|
|
34
|
+
T
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
console.log(t.tex.canonical)
|
|
38
|
+
console.log(G1.relativePosition(t))
|
|
39
|
+
|
|
40
|
+
let d = new Pi.Geometry.Line(G1.center, G2.center)
|
|
41
|
+
console.log(d.tex.canonical)
|
|
42
|
+
|
|
43
|
+
let M = new Pi.Geometry.Point(
|
|
44
|
+
G1.center.x.clone().add(G2.center.x).divide(2),
|
|
45
|
+
G1.center.y.clone().add(G2.center.y).divide(2),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
console.log(M.display)
|
|
49
|
+
|
|
50
|
+
let k = new Pi.Geometry.Line().parseByPointAndLine(
|
|
51
|
+
M, d,
|
|
52
|
+
Pi.Geometry.Line.PERPENDICULAR
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
console.log(k.tex.canonical)
|
|
56
|
+
|
|
57
|
+
console.log(G1.lineIntersection(d))
|
|
28
58
|
</script>
|
|
29
59
|
</body>
|
|
30
60
|
</html>
|