pimath 0.2.8 → 0.2.10
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 +5596 -5042
- package/dist/pimath.js.map +1 -1
- package/package.json +16 -16
- package/src/algebra/equation.ts +21 -22
- package/src/algebra/matrix.ts +45 -8
- package/src/algebra/polynom.ts +19 -16
- 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/equation.d.ts +6 -58
- package/types/algebra/equation.d.ts.map +1 -1
- package/types/algebra/equationSolver.d.ts +4 -3
- package/types/algebra/factor.d.ts +4 -3
- package/types/algebra/index.d.ts +1 -0
- package/types/algebra/linearSystem.d.ts +6 -5
- package/types/algebra/logicalset.d.ts +1 -7
- package/types/algebra/matrix.d.ts +9 -3
- package/types/algebra/matrix.d.ts.map +1 -1
- package/types/algebra/monom.d.ts +3 -115
- package/types/algebra/operations.d.ts +2 -1
- package/types/algebra/polyFactor.d.ts +6 -14
- package/types/algebra/polynom.d.ts +6 -36
- package/types/algebra/polynom.d.ts.map +1 -1
- package/types/analyze/index.d.ts +3 -2
- package/types/analyze/solution.d.ts +4 -3
- package/types/analyze/tableOfSigns.d.ts +4 -3
- package/types/coefficients/fraction.d.ts +2 -14
- package/types/coefficients/index.d.ts +1 -0
- package/types/coefficients/root.d.ts +3 -5
- package/types/geometry/TupleN.d.ts +3 -2
- package/types/geometry/circle.d.ts +6 -15
- package/types/geometry/geomMath.d.ts +4 -3
- package/types/geometry/index.d.ts +1 -0
- package/types/geometry/line.d.ts +7 -16
- package/types/geometry/line3.d.ts +5 -9
- package/types/geometry/plane3.d.ts +6 -5
- package/types/geometry/point.d.ts +6 -5
- package/types/geometry/sphere3.d.ts +5 -4
- package/types/geometry/triangle.d.ts +6 -12
- package/types/geometry/vector.d.ts +5 -4
- package/types/helpers.d.ts +1 -0
- package/types/index.d.ts +22 -21
- package/types/numeric.d.ts +1 -16
- package/types/pimath.interface.d.ts +5 -4
- package/types/randomization/algebra/rndEquation.d.ts +3 -2
- package/types/randomization/algebra/rndMonom.d.ts +3 -2
- package/types/randomization/algebra/rndMonom.d.ts.map +1 -1
- package/types/randomization/algebra/rndPolynom.d.ts +3 -2
- package/types/randomization/coefficient/rndFraction.d.ts +3 -2
- package/types/randomization/geometry/rndCircle.d.ts +3 -2
- package/types/randomization/geometry/rndCircle.d.ts.map +1 -1
- package/types/randomization/geometry/rndLine.d.ts +3 -2
- package/types/randomization/geometry/rndLine3.d.ts +3 -2
- package/types/randomization/geometry/rndPoint.d.ts +4 -0
- package/types/randomization/geometry/rndPoint.d.ts.map +1 -0
- package/types/randomization/geometry/rndVector.d.ts +3 -2
- package/types/randomization/random.d.ts +13 -12
- package/types/randomization/random.d.ts.map +1 -1
- package/types/randomization/rndHelpers.d.ts +1 -14
- package/types/randomization/rndTypes.d.ts +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Point } from
|
|
2
|
-
import { Fraction } from
|
|
3
|
-
import { Equation } from
|
|
4
|
-
import { InputValue } from
|
|
1
|
+
import { Point } from "./point";
|
|
2
|
+
import { Fraction } from "../coefficients";
|
|
3
|
+
import { Equation } from "../algebra";
|
|
4
|
+
import type { InputValue } from "../pimath.interface";
|
|
5
5
|
export declare enum SPHERE3_RELATIVE_POSITION {
|
|
6
6
|
INTERIOR = 0,
|
|
7
7
|
EXTERIOR = 1,
|
|
@@ -32,3 +32,4 @@ export declare class Sphere3 {
|
|
|
32
32
|
relativePosition: (S: Sphere3) => SPHERE3_RELATIVE_POSITION;
|
|
33
33
|
isPointOnSphere: (P: Point) => boolean;
|
|
34
34
|
}
|
|
35
|
+
//# sourceMappingURL=sphere3.d.ts.map
|
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { Line } from
|
|
3
|
-
import { Vector } from
|
|
4
|
-
import { Point } from
|
|
5
|
-
import { InputValue, remarquableLines } from
|
|
1
|
+
import { Fraction } from "../coefficients";
|
|
2
|
+
import { Line } from "./line";
|
|
3
|
+
import { Vector } from "./vector";
|
|
4
|
+
import { Point } from "./point";
|
|
5
|
+
import type { InputValue, remarquableLines } from "../pimath.interface";
|
|
6
6
|
type TRIANGLE_SIDES = 'AB' | 'AC' | 'BC';
|
|
7
7
|
export declare class Triangle {
|
|
8
8
|
#private;
|
|
9
9
|
constructor(...values: unknown[]);
|
|
10
10
|
parse: (...values: unknown[]) => this;
|
|
11
|
-
/**
|
|
12
|
-
* Clone the Triangle class
|
|
13
|
-
*/
|
|
14
11
|
clone: () => Triangle;
|
|
15
|
-
/**
|
|
16
|
-
* Copy the values from another triangle
|
|
17
|
-
* @param value
|
|
18
|
-
*/
|
|
19
12
|
copy(value: Triangle): this;
|
|
20
13
|
get A(): Point;
|
|
21
14
|
set A(value: Point);
|
|
@@ -80,3 +73,4 @@ export declare class Triangle {
|
|
|
80
73
|
reset(): this;
|
|
81
74
|
}
|
|
82
75
|
export {};
|
|
76
|
+
//# sourceMappingURL=triangle.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { InputValue, IPiMathObject } from
|
|
2
|
-
import { Fraction } from
|
|
3
|
-
import { TupleN } from
|
|
4
|
-
import { Point } from
|
|
1
|
+
import type { InputValue, IPiMathObject } from "../pimath.interface";
|
|
2
|
+
import { Fraction } from "../coefficients";
|
|
3
|
+
import { TupleN } from "./TupleN";
|
|
4
|
+
import { type Point } from "./point";
|
|
5
5
|
export declare class Vector extends TupleN implements IPiMathObject<Vector> {
|
|
6
6
|
constructor(...values: (Vector | Point)[] | InputValue<Fraction>[]);
|
|
7
7
|
parse(...values: (Vector | Point)[] | InputValue<Fraction>[]): this;
|
|
@@ -33,3 +33,4 @@ export declare class Vector extends TupleN implements IPiMathObject<Vector> {
|
|
|
33
33
|
translate(...values: Fraction[]): this;
|
|
34
34
|
unit: () => this;
|
|
35
35
|
}
|
|
36
|
+
//# sourceMappingURL=vector.d.ts.map
|
package/types/helpers.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export declare function wrapVert(str: string, tex?: boolean): string;
|
|
|
4
4
|
export declare function wrapNorm(str: string, tex?: boolean): string;
|
|
5
5
|
export declare function replace_in_array<T>(haystack: string[], search: string, target: string, start?: number, end?: number): T;
|
|
6
6
|
export declare function splitIfOutsideParentheses(value: string, splitChar: string): string[];
|
|
7
|
+
//# sourceMappingURL=helpers.d.ts.map
|
package/types/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { Fraction, Root } from
|
|
2
|
-
import { Equation, Factor, LinearSystem, LogicalSet, Matrix, Monom, PolyFactor, Polynom } from
|
|
3
|
-
import { Circle, Line, Line3, Plane3, Point, Sphere3, Triangle, Vector } from
|
|
4
|
-
import { Numeric } from
|
|
5
|
-
import { NumExp } from
|
|
6
|
-
import { Random } from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
1
|
+
import { Fraction, Root } from "./coefficients";
|
|
2
|
+
import { Equation, Factor, LinearSystem, LogicalSet, Matrix, Monom, PolyFactor, Polynom } from "./algebra";
|
|
3
|
+
import { Circle, Line, Line3, Plane3, Point, Sphere3, Triangle, Vector } from "./geometry";
|
|
4
|
+
import { Numeric } from "./numeric";
|
|
5
|
+
import { NumExp } from "piexpression";
|
|
6
|
+
import { Random } from "./randomization/random";
|
|
7
|
+
export * from "./coefficients";
|
|
8
|
+
export * from "./algebra";
|
|
9
|
+
export * from "./geometry";
|
|
10
|
+
export * from "./analyze";
|
|
11
11
|
export { Numeric };
|
|
12
12
|
export { NumExp };
|
|
13
13
|
export { Random };
|
|
14
|
-
export type * from
|
|
15
|
-
export type * from
|
|
14
|
+
export type * from "./pimath.interface";
|
|
15
|
+
export type * from "./randomization/rndTypes";
|
|
16
16
|
declare const PiMath: {
|
|
17
17
|
Numeric: {
|
|
18
18
|
decompose: (value: number) => number[][];
|
|
@@ -38,10 +38,10 @@ declare const PiMath: {
|
|
|
38
38
|
PolyFactor: typeof PolyFactor;
|
|
39
39
|
LogicalSet: typeof LogicalSet;
|
|
40
40
|
Random: {
|
|
41
|
-
equation: (config?: import(
|
|
42
|
-
polynom: (config?: import(
|
|
43
|
-
monom: (config?: import(
|
|
44
|
-
fraction: (config?: import(
|
|
41
|
+
equation: (config?: import(".").randomEquationConfig) => Equation;
|
|
42
|
+
polynom: (config?: import(".").randomPolynomConfig) => Polynom;
|
|
43
|
+
monom: (config?: import(".").randomMonomConfig) => Monom;
|
|
44
|
+
fraction: (config?: import(".").randomCoefficientConfig) => Fraction;
|
|
45
45
|
number: (from: number, to: number, exclude?: number[]) => number;
|
|
46
46
|
numberSym: (max: number, allowZero?: boolean) => number;
|
|
47
47
|
prime: (max: number) => number;
|
|
@@ -50,11 +50,11 @@ declare const PiMath: {
|
|
|
50
50
|
array: <T>(arr: T[], number?: number) => T[];
|
|
51
51
|
item: <T>(arr: T[]) => T;
|
|
52
52
|
shuffle: <T>(arr: T[]) => T[];
|
|
53
|
-
line: (config?: import(
|
|
54
|
-
line3: (config?: import(
|
|
55
|
-
vector: (config?: import(
|
|
56
|
-
point: (config?: import(
|
|
57
|
-
circle: (config?: import(
|
|
53
|
+
line: (config?: import(".").randomGeometryLineConfig) => Line;
|
|
54
|
+
line3: (config?: import(".").randomGeometryLine3Config) => Line3;
|
|
55
|
+
vector: (config?: import(".").randomGeometryPointConfig) => Vector;
|
|
56
|
+
point: (config?: import(".").randomGeometryPointConfig) => Point;
|
|
57
|
+
circle: (config?: import(".").randomGeometryCircleConfig) => Circle;
|
|
58
58
|
};
|
|
59
59
|
Geometry: {
|
|
60
60
|
Vector: typeof Vector;
|
|
@@ -69,3 +69,4 @@ declare const PiMath: {
|
|
|
69
69
|
NumExp: typeof NumExp;
|
|
70
70
|
};
|
|
71
71
|
export default PiMath;
|
|
72
|
+
//# sourceMappingURL=index.d.ts.map
|
package/types/numeric.d.ts
CHANGED
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
declare function decompose(value: number): number[][];
|
|
2
2
|
declare function divideNumbersByGCD(...values: number[]): number[];
|
|
3
|
-
/**
|
|
4
|
-
* Get the list of all dividers of a number.
|
|
5
|
-
* @param value
|
|
6
|
-
*/
|
|
7
3
|
declare function dividers(value: number): number[];
|
|
8
|
-
/**
|
|
9
|
-
* Great Common Divisor
|
|
10
|
-
* @param values : number values
|
|
11
|
-
*/
|
|
12
4
|
declare function greatestCommonDivisor(...values: number[]): number;
|
|
13
|
-
/**
|
|
14
|
-
* Least Common Multiple
|
|
15
|
-
* @param values: list of numbers
|
|
16
|
-
*/
|
|
17
5
|
declare function leastCommonMultiple(...values: number[]): number;
|
|
18
6
|
declare function numberCorrection(value: number, number_of_digits?: number): number;
|
|
19
7
|
declare function periodic(value: number): number;
|
|
20
|
-
/**
|
|
21
|
-
* Get the list of the nth first prime numbers.
|
|
22
|
-
* @param nb : number of primes to choose from
|
|
23
|
-
*/
|
|
24
8
|
declare function primes(nb?: number): number[];
|
|
25
9
|
declare function pythagoreanTripletsWithTarget(target: number, targetIsSquare?: boolean): [number, number, number][];
|
|
26
10
|
declare function round(value: number, decimals?: number): number;
|
|
@@ -39,3 +23,4 @@ export declare const Numeric: {
|
|
|
39
23
|
greatestPower: typeof greatestPower;
|
|
40
24
|
};
|
|
41
25
|
export {};
|
|
26
|
+
//# sourceMappingURL=numeric.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { Equation, Factor, Monom } from
|
|
3
|
-
import { Line, Point, Vector } from
|
|
4
|
-
import { Solution } from
|
|
1
|
+
import type { Fraction } from "./coefficients";
|
|
2
|
+
import type { Equation, Factor, Monom } from "./algebra";
|
|
3
|
+
import type { Line, Point, Vector } from "./geometry";
|
|
4
|
+
import type { Solution } from "./analyze/solution";
|
|
5
5
|
export type InputValue<T> = T | string | number | Fraction;
|
|
6
6
|
export type InputAlgebra<T> = InputValue<T> | Monom;
|
|
7
7
|
export type literalType<T> = Record<string, T>;
|
|
@@ -116,3 +116,4 @@ export interface remarquableLines {
|
|
|
116
116
|
'intersection': Point | null;
|
|
117
117
|
} | null;
|
|
118
118
|
}
|
|
119
|
+
//# sourceMappingURL=pimath.interface.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { randomEquationConfig } from
|
|
2
|
-
import { Equation } from
|
|
1
|
+
import type { randomEquationConfig } from "../rndTypes";
|
|
2
|
+
import { Equation } from "../../algebra/equation";
|
|
3
3
|
export declare function rndEquation(userConfig?: randomEquationConfig): Equation;
|
|
4
|
+
//# sourceMappingURL=rndEquation.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { randomMonomConfig } from
|
|
2
|
-
import { Monom } from
|
|
1
|
+
import type { randomMonomConfig } from "../rndTypes";
|
|
2
|
+
import { Monom } from "../../algebra/monom";
|
|
3
3
|
export declare function rndMonom(userConfig?: randomMonomConfig): Monom;
|
|
4
|
+
//# sourceMappingURL=rndMonom.d.ts.map
|
|
@@ -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,4 +1,5 @@
|
|
|
1
|
-
import { randomPolynomConfig } from
|
|
2
|
-
import { Polynom } from
|
|
1
|
+
import type { randomPolynomConfig } from "../rndTypes";
|
|
2
|
+
import { Polynom } from "../../algebra";
|
|
3
3
|
export declare function rndPolynom(userConfig?: randomPolynomConfig): Polynom;
|
|
4
4
|
export declare function rndFactorablePolynom(userConfig?: randomPolynomConfig): Polynom;
|
|
5
|
+
//# sourceMappingURL=rndPolynom.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { randomCoefficientConfig } from
|
|
2
|
-
import { Fraction } from
|
|
1
|
+
import type { randomCoefficientConfig } from "../rndTypes";
|
|
2
|
+
import { Fraction } from "../../coefficients";
|
|
3
3
|
export declare function rndFraction(userConfig?: randomCoefficientConfig): Fraction;
|
|
4
|
+
//# sourceMappingURL=rndFraction.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { Circle } from
|
|
2
|
-
import { randomGeometryCircleConfig } from
|
|
1
|
+
import { Circle } from "../../geometry/circle";
|
|
2
|
+
import type { randomGeometryCircleConfig } from "../rndTypes";
|
|
3
3
|
export declare function rndCircle(userConfig?: randomGeometryCircleConfig): Circle;
|
|
4
|
+
//# sourceMappingURL=rndCircle.d.ts.map
|
|
@@ -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"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { Line } from
|
|
2
|
-
import { randomGeometryLineConfig } from
|
|
1
|
+
import { Line } from "../../geometry/line";
|
|
2
|
+
import type { randomGeometryLineConfig } from "../rndTypes";
|
|
3
3
|
export declare function rndLine(userConfig?: randomGeometryLineConfig): Line;
|
|
4
|
+
//# sourceMappingURL=rndLine.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { Line3 } from
|
|
2
|
-
import { randomGeometryLine3Config } from
|
|
1
|
+
import { Line3 } from "../../geometry/line3";
|
|
2
|
+
import type { randomGeometryLine3Config } from "../rndTypes";
|
|
3
3
|
export declare function rndLine3(userConfig?: randomGeometryLine3Config): Line3;
|
|
4
|
+
//# sourceMappingURL=rndLine3.d.ts.map
|
|
@@ -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,sBAAsB,CAAA;AAE1C,wBAAgB,QAAQ,CAAC,UAAU,CAAC,EAAE,yBAAyB,GAAG,KAAK,CAwDtE"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { randomGeometryPointConfig } from
|
|
2
|
-
import { Point } from
|
|
1
|
+
import type { randomGeometryPointConfig } from "../rndTypes";
|
|
2
|
+
import { Point } from "../../geometry/point";
|
|
3
3
|
export declare function rndVector(userConfig?: randomGeometryPointConfig): Point;
|
|
4
|
+
//# sourceMappingURL=rndVector.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { randomCoefficientConfig, randomEquationConfig, randomGeometryCircleConfig, randomGeometryLine3Config, randomGeometryLineConfig, randomGeometryPointConfig, randomMonomConfig, randomPolynomConfig } from
|
|
2
|
-
import {
|
|
3
|
-
export type * from
|
|
1
|
+
import type { randomCoefficientConfig, randomEquationConfig, randomGeometryCircleConfig, randomGeometryLine3Config, randomGeometryLineConfig, randomGeometryPointConfig, randomMonomConfig, randomPolynomConfig } from "./rndTypes";
|
|
2
|
+
import { Vector } from "../geometry";
|
|
3
|
+
export type * from "./rndTypes";
|
|
4
4
|
export declare const Random: {
|
|
5
|
-
equation: (config?: randomEquationConfig) => import(
|
|
6
|
-
polynom: (config?: randomPolynomConfig) => import(
|
|
7
|
-
monom: (config?: randomMonomConfig) => import(
|
|
8
|
-
fraction: (config?: randomCoefficientConfig) => import(
|
|
5
|
+
equation: (config?: randomEquationConfig) => import("..").Equation;
|
|
6
|
+
polynom: (config?: randomPolynomConfig) => import("..").Polynom;
|
|
7
|
+
monom: (config?: randomMonomConfig) => import("..").Monom;
|
|
8
|
+
fraction: (config?: randomCoefficientConfig) => import("..").Fraction;
|
|
9
9
|
number: (from: number, to: number, exclude?: number[]) => number;
|
|
10
10
|
numberSym: (max: number, allowZero?: boolean) => number;
|
|
11
11
|
prime: (max: number) => number;
|
|
@@ -14,9 +14,10 @@ export declare const Random: {
|
|
|
14
14
|
array: <T>(arr: T[], number?: number) => T[];
|
|
15
15
|
item: <T>(arr: T[]) => T;
|
|
16
16
|
shuffle: <T>(arr: T[]) => T[];
|
|
17
|
-
line: (config?: randomGeometryLineConfig) => import(
|
|
18
|
-
line3: (config?: randomGeometryLine3Config) => import(
|
|
19
|
-
vector: (config?: randomGeometryPointConfig) =>
|
|
20
|
-
point: (config?: randomGeometryPointConfig) => Point;
|
|
21
|
-
circle: (config?: randomGeometryCircleConfig) => import(
|
|
17
|
+
line: (config?: randomGeometryLineConfig) => import("..").Line;
|
|
18
|
+
line3: (config?: randomGeometryLine3Config) => import("..").Line3;
|
|
19
|
+
vector: (config?: randomGeometryPointConfig) => Vector;
|
|
20
|
+
point: (config?: randomGeometryPointConfig) => import("..").Point;
|
|
21
|
+
circle: (config?: randomGeometryCircleConfig) => import("..").Circle;
|
|
22
22
|
};
|
|
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"}
|
|
@@ -1,22 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Random boolean with a percent ratio
|
|
3
|
-
* @param percent
|
|
4
|
-
*/
|
|
5
1
|
export declare function randomBool(percent?: number): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Random integer between two values.
|
|
8
|
-
* @param a (number) : From this value to the second value. If the second is ommited, this value is the max value.
|
|
9
|
-
* @param b (number) : To this value. If this is ommited.
|
|
10
|
-
*/
|
|
11
2
|
export declare function randomInt(a: number, b?: number, exclude?: number[]): number;
|
|
12
|
-
/**
|
|
13
|
-
* Random integer between -max and max value.
|
|
14
|
-
* @param max (number) : determine the limits.
|
|
15
|
-
* @param zero (bool) : determine if zero is allowed or not.
|
|
16
|
-
*/
|
|
17
3
|
export declare function randomIntSym(max: number, zero?: boolean): number;
|
|
18
4
|
export declare function randomTriplet(target: number, allowZero?: boolean): [number, number, number] | null;
|
|
19
5
|
export declare function randomPrime(max?: number): number;
|
|
20
6
|
export declare function randomArray<T>(arr: T[], number?: number): T[];
|
|
21
7
|
export declare function randomItem<T>(arr: T[]): T;
|
|
22
8
|
export declare function shuffleArray<T>(arr: T[]): T[];
|
|
9
|
+
//# sourceMappingURL=rndHelpers.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fraction } from
|
|
1
|
+
import { Fraction } from "../coefficients/fraction";
|
|
2
2
|
export interface randomCoefficientConfig {
|
|
3
3
|
max?: number;
|
|
4
4
|
natural?: boolean;
|
|
@@ -66,3 +66,4 @@ export interface randomGeometryCircleConfig {
|
|
|
66
66
|
pointsOnCircle?: number;
|
|
67
67
|
radius?: number;
|
|
68
68
|
}
|
|
69
|
+
//# sourceMappingURL=rndTypes.d.ts.map
|