pimath 0.2.9 → 0.2.11
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/pimath.js +95 -61
- package/dist/pimath.js.map +1 -1
- package/package.json +12 -12
- package/src/algebra/matrix.ts +45 -8
- package/src/algebra/polyFactor.ts +6 -3
- package/src/coefficients/root.ts +1 -1
- package/src/randomization/algebra/rndMonom.ts +16 -10
- package/src/randomization/geometry/rndCircle.ts +5 -5
- package/src/randomization/geometry/{rndVector.ts → rndPoint.ts} +6 -6
- package/src/randomization/random.ts +4 -4
- package/types/algebra/matrix.d.ts +5 -0
- package/types/algebra/matrix.d.ts.map +1 -1
- package/types/algebra/polyFactor.d.ts +1 -1
- package/types/algebra/polyFactor.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/randomization/algebra/rndMonom.d.ts.map +1 -1
- package/types/randomization/geometry/rndCircle.d.ts.map +1 -1
- package/types/randomization/geometry/rndPoint.d.ts +4 -0
- package/types/randomization/geometry/rndPoint.d.ts.map +1 -0
- package/types/randomization/random.d.ts +3 -3
- package/types/randomization/random.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pimath",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "A math library for teacher :)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/pimath.js",
|
|
@@ -38,24 +38,24 @@
|
|
|
38
38
|
"url": "git+https://github.com/basilgass/PiMath.git"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tailwindcss/vite": "^4.3.
|
|
41
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
42
42
|
"@types/eslint": "^9.6.1",
|
|
43
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
44
|
-
"autoprefixer": "^10.5.
|
|
45
|
-
"dependency-cruiser": "^18.
|
|
46
|
-
"eslint": "^10.
|
|
47
|
-
"globals": "^17.
|
|
48
|
-
"tailwindcss": "^4.3.
|
|
43
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
44
|
+
"autoprefixer": "^10.5.4",
|
|
45
|
+
"dependency-cruiser": "^18.1.0",
|
|
46
|
+
"eslint": "^10.8.0",
|
|
47
|
+
"globals": "^17.8.0",
|
|
48
|
+
"tailwindcss": "^4.3.3",
|
|
49
49
|
"ts-loader": "^9.6.2",
|
|
50
50
|
"ts-node": "^10.9.2",
|
|
51
51
|
"typedoc": "^0.28.20",
|
|
52
52
|
"typescript": "^6.0.3",
|
|
53
|
-
"typescript-eslint": "^8.
|
|
54
|
-
"vite": "^8.
|
|
53
|
+
"typescript-eslint": "^8.65.0",
|
|
54
|
+
"vite": "^8.2.0",
|
|
55
55
|
"vitest": "^4.1.10",
|
|
56
|
-
"vue-router": "^5.
|
|
56
|
+
"vue-router": "^5.2.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"piexpression": "^0.1.
|
|
59
|
+
"piexpression": "^0.1.4"
|
|
60
60
|
}
|
|
61
61
|
}
|
package/src/algebra/matrix.ts
CHANGED
|
@@ -5,10 +5,17 @@ import {operation_pow} from "./operations"
|
|
|
5
5
|
|
|
6
6
|
export type IMatrixValues = InputAlgebra<Polynom>[][]
|
|
7
7
|
|
|
8
|
+
enum MATRIX_TYPE {
|
|
9
|
+
pmatrix,
|
|
10
|
+
bmatrix,
|
|
11
|
+
Bmatrix,
|
|
12
|
+
vmatrix,
|
|
13
|
+
Vmatrix
|
|
14
|
+
}
|
|
8
15
|
export class Matrix implements IPiMathObject<Matrix>,
|
|
9
16
|
IExpressionMultiply<Matrix> {
|
|
10
17
|
#digits: number | null = null
|
|
11
|
-
#matrix_parenthesis =
|
|
18
|
+
#matrix_parenthesis: MATRIX_TYPE = MATRIX_TYPE.pmatrix
|
|
12
19
|
#values: Polynom[][] = []
|
|
13
20
|
|
|
14
21
|
constructor(rowCount?: number, colCount?: number) {
|
|
@@ -22,8 +29,6 @@ export class Matrix implements IPiMathObject<Matrix>,
|
|
|
22
29
|
|
|
23
30
|
public parse(values: IMatrixValues): this {
|
|
24
31
|
return this.fromValues(values)
|
|
25
|
-
|
|
26
|
-
return this
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
public clone(): Matrix {
|
|
@@ -47,8 +52,7 @@ export class Matrix implements IPiMathObject<Matrix>,
|
|
|
47
52
|
return ""
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
const wrapper = this
|
|
51
|
-
|
|
55
|
+
const wrapper = this.resolveTeXwrapper()
|
|
52
56
|
|
|
53
57
|
const output = [
|
|
54
58
|
`\\begin{${wrapper}}`,
|
|
@@ -65,12 +69,30 @@ export class Matrix implements IPiMathObject<Matrix>,
|
|
|
65
69
|
return output
|
|
66
70
|
}
|
|
67
71
|
|
|
72
|
+
resolveWrapper(): [string, string]{
|
|
73
|
+
if(this.#matrix_parenthesis=== MATRIX_TYPE.vmatrix) return ['|', '|']
|
|
74
|
+
if(this.#matrix_parenthesis=== MATRIX_TYPE.Vmatrix) return ['||', '||']
|
|
75
|
+
if(this.#matrix_parenthesis=== MATRIX_TYPE.bmatrix) return ['[', ']']
|
|
76
|
+
if(this.#matrix_parenthesis=== MATRIX_TYPE.Bmatrix) return ['{', '}']
|
|
77
|
+
|
|
78
|
+
return ['(', ')']
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
resolveTeXwrapper(): string {
|
|
82
|
+
if(this.#matrix_parenthesis=== MATRIX_TYPE.vmatrix) return 'vmatrix'
|
|
83
|
+
if(this.#matrix_parenthesis=== MATRIX_TYPE.Vmatrix) return 'Vmatrix'
|
|
84
|
+
if(this.#matrix_parenthesis=== MATRIX_TYPE.bmatrix) return 'bmatrix'
|
|
85
|
+
if(this.#matrix_parenthesis=== MATRIX_TYPE.Bmatrix) return 'Bmatrix'
|
|
86
|
+
|
|
87
|
+
return 'pmatrix'
|
|
88
|
+
}
|
|
89
|
+
|
|
68
90
|
get display(): string {
|
|
69
91
|
if (this.#values.length === 0) {
|
|
70
92
|
return ""
|
|
71
93
|
}
|
|
72
94
|
|
|
73
|
-
const wrapper = this
|
|
95
|
+
const wrapper = this.resolveWrapper()
|
|
74
96
|
|
|
75
97
|
const output = wrapper[0] +
|
|
76
98
|
this.map(aij => this.#digits !== null && aij.value ? +aij.value.toFixed(this.#digits): aij.display)
|
|
@@ -103,7 +125,12 @@ export class Matrix implements IPiMathObject<Matrix>,
|
|
|
103
125
|
}
|
|
104
126
|
|
|
105
127
|
get bmatrix(): this {
|
|
106
|
-
this.#matrix_parenthesis =
|
|
128
|
+
this.#matrix_parenthesis = MATRIX_TYPE.bmatrix
|
|
129
|
+
return this
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
get Bmatrix(): this {
|
|
133
|
+
this.#matrix_parenthesis = MATRIX_TYPE.Bmatrix
|
|
107
134
|
return this
|
|
108
135
|
}
|
|
109
136
|
|
|
@@ -409,7 +436,17 @@ export class Matrix implements IPiMathObject<Matrix>,
|
|
|
409
436
|
}
|
|
410
437
|
|
|
411
438
|
get pmatrix(): this {
|
|
412
|
-
this.#matrix_parenthesis =
|
|
439
|
+
this.#matrix_parenthesis = MATRIX_TYPE.pmatrix
|
|
440
|
+
return this
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
get vmatrix(): this {
|
|
444
|
+
this.#matrix_parenthesis = MATRIX_TYPE.vmatrix
|
|
445
|
+
return this
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
get Vmatrix(): this {
|
|
449
|
+
this.#matrix_parenthesis = MATRIX_TYPE.Vmatrix
|
|
413
450
|
return this
|
|
414
451
|
}
|
|
415
452
|
|
|
@@ -39,7 +39,9 @@ export class PolyFactor implements IPiMathObject<PolyFactor>,
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
values.forEach(value => {
|
|
42
|
-
if
|
|
42
|
+
if(typeof value==="string"){
|
|
43
|
+
return this.fromString(value)
|
|
44
|
+
}else if (value instanceof PolyFactor) {
|
|
43
45
|
this.#factors.push(...value.factors.map(f => f.clone()))
|
|
44
46
|
} else {
|
|
45
47
|
this.#factors.push(new Factor(value))
|
|
@@ -420,9 +422,10 @@ export class PolyFactor implements IPiMathObject<PolyFactor>,
|
|
|
420
422
|
return this.#factors.every(f => f.isZero())
|
|
421
423
|
}
|
|
422
424
|
|
|
423
|
-
public multiply(...values: PolyFactor[]): this {
|
|
425
|
+
public multiply(...values: (InputAlgebra<Polynom> | Factor |PolyFactor)[]): this {
|
|
424
426
|
values.forEach(value => {
|
|
425
|
-
|
|
427
|
+
const PF = new PolyFactor( value )
|
|
428
|
+
this.#factors = this.#factors.concat(PF.factors)
|
|
426
429
|
})
|
|
427
430
|
|
|
428
431
|
return this
|
package/src/coefficients/root.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type {randomMonomConfig} from "../rndTypes"
|
|
2
|
+
import {Monom} from "../../algebra/monom"
|
|
3
|
+
import {rndFraction} from "../coefficient/rndFraction"
|
|
4
|
+
import {randomItem} from "../rndHelpers"
|
|
5
5
|
|
|
6
6
|
export function rndMonom(userConfig?: randomMonomConfig): Monom {
|
|
7
7
|
const config = Object.assign(
|
|
@@ -9,18 +9,24 @@ export function rndMonom(userConfig?: randomMonomConfig): Monom {
|
|
|
9
9
|
letters: 'x',
|
|
10
10
|
degree: 2,
|
|
11
11
|
fraction: true,
|
|
12
|
-
zero: false
|
|
12
|
+
zero: false,
|
|
13
13
|
}, userConfig)
|
|
14
14
|
|
|
15
15
|
// Create a monom instance
|
|
16
16
|
const M = new Monom()
|
|
17
17
|
|
|
18
18
|
// Generate the coefficient
|
|
19
|
-
M.coefficient = rndFraction(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
M.coefficient = rndFraction(
|
|
20
|
+
Object.assign(
|
|
21
|
+
{},
|
|
22
|
+
{
|
|
23
|
+
zero: config.zero,
|
|
24
|
+
reduced: true,
|
|
25
|
+
natural: config.fraction===false,
|
|
26
|
+
},
|
|
27
|
+
typeof config.fraction === "boolean" ? {} : config.fraction
|
|
28
|
+
)
|
|
29
|
+
)
|
|
24
30
|
|
|
25
31
|
if (config.letters.length > 1) {
|
|
26
32
|
// Initialise each items...
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
4
|
-
import {
|
|
1
|
+
import {Circle} from "../../geometry/circle"
|
|
2
|
+
import {randomInt} from "../rndHelpers"
|
|
3
|
+
import type {randomGeometryCircleConfig} from "../rndTypes"
|
|
4
|
+
import {rndPoint} from "./rndPoint"
|
|
5
5
|
|
|
6
6
|
export function rndCircle(userConfig?: randomGeometryCircleConfig): Circle {
|
|
7
7
|
const config = Object.assign(
|
|
@@ -13,7 +13,7 @@ export function rndCircle(userConfig?: randomGeometryCircleConfig): Circle {
|
|
|
13
13
|
pointsOnCircle: 8
|
|
14
14
|
}, userConfig)
|
|
15
15
|
|
|
16
|
-
const center =
|
|
16
|
+
const center = rndPoint(config.center)
|
|
17
17
|
|
|
18
18
|
let rv, r
|
|
19
19
|
if (config.pointsOnCircle === 8) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import {Fraction} from "../../coefficients"
|
|
2
|
+
import type {randomGeometryPointConfig} from "../rndTypes"
|
|
3
|
+
import {rndFraction} from "../coefficient/rndFraction"
|
|
4
|
+
import {randomIntSym} from "../rndHelpers"
|
|
5
|
+
import {Point} from "../../geometry"
|
|
6
6
|
|
|
7
|
-
export function
|
|
7
|
+
export function rndPoint(userConfig?: randomGeometryPointConfig): Point {
|
|
8
8
|
const config: {
|
|
9
9
|
axis: 'x' | 'y' | 'z' | null,
|
|
10
10
|
fraction: boolean,
|
|
@@ -26,8 +26,8 @@ import {rndEquation} from "./algebra/rndEquation"
|
|
|
26
26
|
import {rndCircle} from "./geometry/rndCircle"
|
|
27
27
|
import {rndLine} from "./geometry/rndLine"
|
|
28
28
|
import {rndLine3} from "./geometry/rndLine3"
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
29
|
+
import {rndPoint} from "./geometry/rndPoint"
|
|
30
|
+
import {Vector} from "../geometry"
|
|
31
31
|
|
|
32
32
|
export type * from "./rndTypes"
|
|
33
33
|
|
|
@@ -89,11 +89,11 @@ export const Random = {
|
|
|
89
89
|
},
|
|
90
90
|
|
|
91
91
|
vector: (config?: randomGeometryPointConfig) => {
|
|
92
|
-
return
|
|
92
|
+
return new Vector(rndPoint(config))
|
|
93
93
|
},
|
|
94
94
|
|
|
95
95
|
point: (config?: randomGeometryPointConfig) => {
|
|
96
|
-
return
|
|
96
|
+
return rndPoint(config)
|
|
97
97
|
},
|
|
98
98
|
|
|
99
99
|
circle: (config?: randomGeometryCircleConfig) => {
|
|
@@ -8,10 +8,13 @@ export declare class Matrix implements IPiMathObject<Matrix>, IExpressionMultipl
|
|
|
8
8
|
parse(values: IMatrixValues): this;
|
|
9
9
|
clone(): Matrix;
|
|
10
10
|
get tex(): string;
|
|
11
|
+
resolveWrapper(): [string, string];
|
|
12
|
+
resolveTeXwrapper(): string;
|
|
11
13
|
get display(): string;
|
|
12
14
|
add(value: Matrix): this;
|
|
13
15
|
aij(i: number, j: number): Polynom | null;
|
|
14
16
|
get bmatrix(): this;
|
|
17
|
+
get Bmatrix(): this;
|
|
15
18
|
canBeAdded(matrix: Matrix): boolean;
|
|
16
19
|
canBeInverted(): boolean;
|
|
17
20
|
canBeMultiplied(matrix: Matrix): boolean;
|
|
@@ -39,6 +42,8 @@ export declare class Matrix implements IPiMathObject<Matrix>, IExpressionMultipl
|
|
|
39
42
|
one(): this;
|
|
40
43
|
opposite(): this;
|
|
41
44
|
get pmatrix(): this;
|
|
45
|
+
get vmatrix(): this;
|
|
46
|
+
get Vmatrix(): this;
|
|
42
47
|
pow(value: number): this;
|
|
43
48
|
reduce(): Matrix;
|
|
44
49
|
get rows(): Polynom[][];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../src/algebra/matrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACrG,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAA;AAGvC,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../src/algebra/matrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACrG,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAA;AAGvC,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE,CAAA;AASrD,qBAAa,MAAO,YAAW,aAAa,CAAC,MAAM,CAAC,EAChD,mBAAmB,CAAC,MAAM,CAAC;;gBAKf,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IASzC,KAAK,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAIlC,KAAK,IAAI,MAAM;IAgBtB,IAAI,GAAG,IAAI,MAAM,CAoBhB;IAED,cAAc,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;IASlC,iBAAiB,IAAI,MAAM;IAS3B,IAAI,OAAO,IAAI,MAAM,CAgBpB;IAEM,GA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,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE;IAgBzE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI;IAiCnD,GAAG,IAAI,IAAI;IAWX,QAAQ,IAAI,IAAI;IAOvB,IAAI,OAAO,IAAI,IAAI,CAGlB;IAED,IAAI,OAAO,IAAI,IAAI,CAGlB;IAED,IAAI,OAAO,IAAI,IAAI,CAGlB;IAEM,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIxB,MAAM,IAAI,MAAM;IAIvB,IAAI,IAAI,IAAI,OAAO,EAAE,EAAE,CAEtB;IAEM,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,IAAI;IAWzE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAYpC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKrB,SAAS,IAAI,IAAI;IAUxB,IAAI,MAAM,IAAI,OAAO,EAAE,EAAE,CAExB;IAEM,IAAI,IAAI,IAAI;CAItB"}
|
|
@@ -33,7 +33,7 @@ export declare class PolyFactor implements IPiMathObject<PolyFactor>, IExpressio
|
|
|
33
33
|
isEqual(value: PolyFactor): boolean;
|
|
34
34
|
isOne(): boolean;
|
|
35
35
|
isZero(): boolean;
|
|
36
|
-
multiply(...values: PolyFactor[]): this;
|
|
36
|
+
multiply(...values: (InputAlgebra<Polynom> | Factor | PolyFactor)[]): this;
|
|
37
37
|
get numerator(): PolyFactor;
|
|
38
38
|
one(): this;
|
|
39
39
|
opposite(): this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polyFactor.d.ts","sourceRoot":"","sources":["../../src/algebra/polyFactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,QAAQ,EACR,WAAW,EACX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W,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAIpC,OAAO,IAAI,IAAI;IAKf,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO;IASnC,KAAK,IAAI,OAAO;IAIhB,MAAM,IAAI,OAAO;IAIjB,QAAQ,CAAC,GAAG,MAAM,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,MAAM,GAAE,UAAU,CAAC,EAAE,GAAG,IAAI;IAShF,IAAI,SAAS,IAAI,UAAU,CAE1B;IAEM,GAAG,IAAI,IAAI;IAKX,QAAQ,IAAI,IAAI;IAahB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI;IAKnC,SAAS,IAAI,UAAU;IAIvB,MAAM,IAAI,IAAI;IAmCd,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAWzB,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IA6C3B,IAAI,IAAI,IAAI;IAKZ,QAAQ,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI;IAIvC,YAAY,IAAI,yBAAyB;IAiFhD,IAAW,SAAS,IAAI,MAAM,EAAE,CAG/B;IAEM,IAAI,IAAI,IAAI;CAwBtB"}
|
package/types/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ declare const PiMath: {
|
|
|
52
52
|
shuffle: <T>(arr: T[]) => T[];
|
|
53
53
|
line: (config?: import(".").randomGeometryLineConfig) => Line;
|
|
54
54
|
line3: (config?: import(".").randomGeometryLine3Config) => Line3;
|
|
55
|
-
vector: (config?: import(".").randomGeometryPointConfig) =>
|
|
55
|
+
vector: (config?: import(".").randomGeometryPointConfig) => Vector;
|
|
56
56
|
point: (config?: import(".").randomGeometryPointConfig) => Point;
|
|
57
57
|
circle: (config?: import(".").randomGeometryCircleConfig) => Circle;
|
|
58
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rndMonom.d.ts","sourceRoot":"","sources":["../../../src/randomization/algebra/rndMonom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"rndMonom.d.ts","sourceRoot":"","sources":["../../../src/randomization/algebra/rndMonom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,aAAa,CAAA;AAClD,OAAO,EAAC,KAAK,EAAC,MAAM,qBAAqB,CAAA;AAIzC,wBAAgB,QAAQ,CAAC,UAAU,CAAC,EAAE,iBAAiB,GAAG,KAAK,CAuC9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rndCircle.d.ts","sourceRoot":"","sources":["../../../src/randomization/geometry/rndCircle.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"rndCircle.d.ts","sourceRoot":"","sources":["../../../src/randomization/geometry/rndCircle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,uBAAuB,CAAA;AAE5C,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,aAAa,CAAA;AAG3D,wBAAgB,SAAS,CAAC,UAAU,CAAC,EAAE,0BAA0B,GAAG,MAAM,CAqBzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rndPoint.d.ts","sourceRoot":"","sources":["../../../src/randomization/geometry/rndPoint.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,aAAa,CAAA;AAG1D,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAA;AAEpC,wBAAgB,QAAQ,CAAC,UAAU,CAAC,EAAE,yBAAyB,GAAG,KAAK,CAwDtE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { randomCoefficientConfig, randomEquationConfig, randomGeometryCircleConfig, randomGeometryLine3Config, randomGeometryLineConfig, randomGeometryPointConfig, randomMonomConfig, randomPolynomConfig } from "./rndTypes";
|
|
2
|
-
import {
|
|
2
|
+
import { Vector } from "../geometry";
|
|
3
3
|
export type * from "./rndTypes";
|
|
4
4
|
export declare const Random: {
|
|
5
5
|
equation: (config?: randomEquationConfig) => import("..").Equation;
|
|
@@ -16,8 +16,8 @@ export declare const Random: {
|
|
|
16
16
|
shuffle: <T>(arr: T[]) => T[];
|
|
17
17
|
line: (config?: randomGeometryLineConfig) => import("..").Line;
|
|
18
18
|
line3: (config?: randomGeometryLine3Config) => import("..").Line3;
|
|
19
|
-
vector: (config?: randomGeometryPointConfig) =>
|
|
20
|
-
point: (config?: randomGeometryPointConfig) => Point;
|
|
19
|
+
vector: (config?: randomGeometryPointConfig) => Vector;
|
|
20
|
+
point: (config?: randomGeometryPointConfig) => import("..").Point;
|
|
21
21
|
circle: (config?: randomGeometryCircleConfig) => import("..").Circle;
|
|
22
22
|
};
|
|
23
23
|
//# sourceMappingURL=random.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src/randomization/random.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACtB,MAAM,YAAY,CAAA;AAoBnB,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src/randomization/random.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,iBAAiB,EACjB,mBAAmB,EACtB,MAAM,YAAY,CAAA;AAoBnB,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAA;AAElC,mBAAmB,YAAY,CAAA;AAE/B,eAAO,MAAM,MAAM;wBACK,oBAAoB;uBAIrB,mBAAmB;qBAIrB,iBAAiB;wBAId,uBAAuB;mBAI5B,MAAM,MAAM,MAAM,YAAY,MAAM,EAAE,KAAG,MAAM;qBAI7C,MAAM,cAAc,OAAO,KAAG,MAAM;iBAIxC,MAAM,KAAG,MAAM;sBAIV,MAAM,cAAc,OAAO,KAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;qBAI9D,MAAM,KAAG,OAAO;YAIzB,CAAC,OAAO,CAAC,EAAE,WAAW,MAAM,KAAG,CAAC,EAAE;WAInC,CAAC,OAAO,CAAC,EAAE,KAAG,CAAC;cAIZ,CAAC,OAAO,CAAC,EAAE,KAAG,CAAC,EAAE;oBAIX,wBAAwB;qBAIvB,yBAAyB;sBAIxB,yBAAyB;qBAI1B,yBAAyB;sBAIxB,0BAA0B;CAG/C,CAAA"}
|