pimath 0.0.124 → 0.0.125
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/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_07_11_2023_08_30_[Default_Changelist]/shelved.patch +192 -0
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_07_11_2023_08_30_[Default_Changelist]1/shelved.patch +0 -0
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_07_11_2023_08_30__Default_Changelist_.xml +4 -0
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_09_11_2023_10_43_[Default_Changelist]/shelved.patch +2404 -0
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_09_11_2023_10_43__Default_Changelist_.xml +4 -0
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_09_11_2023_11_01_[Default_Changelist]/shelved.patch +1362 -0
- package/.idea/shelf/Uncommitted_changes_before_Checkout_at_09_11_2023_11_01__Default_Changelist_.xml +4 -0
- package/dist/pimath.js +27 -6
- package/dist/pimath.js.map +1 -1
- package/dist/pimath.min.js +1 -1
- package/dist/pimath.min.js.map +1 -1
- package/esm/maths/randomization/random.d.ts +1 -1
- package/esm/maths/randomization/random.js +2 -2
- package/esm/maths/randomization/random.js.map +1 -1
- package/esm/maths/randomization/rndHelpers.d.ts +1 -1
- package/esm/maths/randomization/rndHelpers.js +25 -4
- package/esm/maths/randomization/rndHelpers.js.map +1 -1
- package/package.json +1 -1
- package/src/maths/randomization/random.ts +2 -2
- package/src/maths/randomization/rndHelpers.ts +49 -18
- package/tests/geometry/circle.test.ts +125 -10
- package/tests/numexp.test.ts +10 -2
- package/dev/pimath.js +0 -7935
- package/dev/pimath.js.map +0 -1
- package/docs/.nojekyll +0 -1
- package/docs/assets/highlight.css +0 -78
- package/docs/assets/main.js +0 -58
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1367
- package/docs/classes/Logicalset.Logicalset.html +0 -221
- package/docs/classes/Polynom.Rational.html +0 -391
- package/docs/classes/Vector-1.Vector.html +0 -494
- package/docs/classes/Vector.Point.html +0 -341
- package/docs/classes/algebra_equation.Equation.html +0 -796
- package/docs/classes/algebra_linearSystem.LinearSystem.html +0 -408
- package/docs/classes/algebra_monom.Monom.html +0 -967
- package/docs/classes/algebra_polynom.Polynom.html +0 -1281
- package/docs/classes/coefficients_fraction.Fraction.html +0 -939
- package/docs/classes/geometry_circle.Circle.html +0 -476
- package/docs/classes/geometry_line.Line.html +0 -779
- package/docs/classes/geometry_triangle.Triangle.html +0 -429
- package/docs/classes/numeric.Numeric.html +0 -269
- package/docs/classes/shutingyard.Shutingyard.html +0 -259
- package/docs/enums/algebra_equation.PARTICULAR_SOLUTION.html +0 -89
- package/docs/enums/geometry_line.LinePropriety.html +0 -102
- package/docs/enums/shutingyard.ShutingyardMode.html +0 -106
- package/docs/enums/shutingyard.ShutingyardType.html +0 -120
- package/docs/index.html +0 -63
- package/docs/interfaces/algebra_equation.ISolution.html +0 -111
- package/docs/interfaces/algebra_polynom.IEuclidian.html +0 -93
- package/docs/interfaces/geometry_triangle.remarquableLines.html +0 -150
- package/docs/modules/Logicalset.html +0 -69
- package/docs/modules/Polynom.html +0 -69
- package/docs/modules/Vector-1.html +0 -69
- package/docs/modules/Vector.html +0 -69
- package/docs/modules/algebra_equation.html +0 -75
- package/docs/modules/algebra_linearSystem.html +0 -65
- package/docs/modules/algebra_monom.html +0 -70
- package/docs/modules/algebra_polynom.html +0 -75
- package/docs/modules/coefficients_fraction.html +0 -70
- package/docs/modules/geometry_circle.html +0 -65
- package/docs/modules/geometry_line.html +0 -70
- package/docs/modules/geometry_triangle.html +0 -70
- package/docs/modules/numeric.html +0 -65
- package/docs/modules/shutingyard.html +0 -84
- package/docs/types/algebra_monom.literalType.html +0 -66
- package/docs/types/algebra_polynom.PolynomParsingType.html +0 -62
- package/docs/types/coefficients_fraction.FractionParsingType.html +0 -61
- package/docs/types/shutingyard.Token.html +0 -72
- package/docs/types/shutingyard.tokenType.html +0 -77
- package/docs/variables/shutingyard.tokenConstant.html +0 -70
- package/esm/maths/expressions/ExpressionTree.d.ts +0 -17
- package/esm/maths/expressions/ExpressionTree.js +0 -150
- package/esm/maths/expressions/ExpressionTree.js.map +0 -1
- package/esm/maths/expressions/expression.d.ts +0 -27
- package/esm/maths/expressions/expression.js +0 -239
- package/esm/maths/expressions/expression.js.map +0 -1
- package/esm/maths/expressions/expressionFactor.d.ts +0 -36
- package/esm/maths/expressions/expressionFactor.js +0 -156
- package/esm/maths/expressions/expressionFactor.js.map +0 -1
- package/esm/maths/expressions/expressionMember.d.ts +0 -27
- package/esm/maths/expressions/expressionMember.js +0 -199
- package/esm/maths/expressions/expressionMember.js.map +0 -1
- package/esm/maths/expressions/expressionOperators.d.ts +0 -8
- package/esm/maths/expressions/expressionOperators.js +0 -42
- package/esm/maths/expressions/expressionOperators.js.map +0 -1
- package/esm/maths/expressions/expressionParser.d.ts +0 -14
- package/esm/maths/expressions/expressionParser.js +0 -259
- package/esm/maths/expressions/expressionParser.js.map +0 -1
- package/esm/maths/expressions/factors/ExpFactor.d.ts +0 -7
- package/esm/maths/expressions/factors/ExpFactor.js +0 -34
- package/esm/maths/expressions/factors/ExpFactor.js.map +0 -1
- package/esm/maths/expressions/factors/ExpFactorConstant.d.ts +0 -14
- package/esm/maths/expressions/factors/ExpFactorConstant.js +0 -52
- package/esm/maths/expressions/factors/ExpFactorConstant.js.map +0 -1
- package/esm/maths/expressions/factors/ExpFactorExponential.d.ts +0 -8
- package/esm/maths/expressions/factors/ExpFactorExponential.js +0 -22
- package/esm/maths/expressions/factors/ExpFactorExponential.js.map +0 -1
- package/esm/maths/expressions/factors/ExpFactorNumber.d.ts +0 -14
- package/esm/maths/expressions/factors/ExpFactorNumber.js +0 -59
- package/esm/maths/expressions/factors/ExpFactorNumber.js.map +0 -1
- package/esm/maths/expressions/factors/ExpFactorPower.d.ts +0 -13
- package/esm/maths/expressions/factors/ExpFactorPower.js +0 -35
- package/esm/maths/expressions/factors/ExpFactorPower.js.map +0 -1
- package/esm/maths/expressions/factors/ExpFactorTrigo.d.ts +0 -20
- package/esm/maths/expressions/factors/ExpFactorTrigo.js +0 -48
- package/esm/maths/expressions/factors/ExpFactorTrigo.js.map +0 -1
- package/esm/maths/expressions/factors/ExpFactorVariable.d.ts +0 -13
- package/esm/maths/expressions/factors/ExpFactorVariable.js +0 -36
- package/esm/maths/expressions/factors/ExpFactorVariable.js.map +0 -1
- package/esm/maths/expressions/internals.d.ts +0 -12
- package/esm/maths/expressions/internals.js +0 -29
- package/esm/maths/expressions/internals.js.map +0 -1
- package/esm/maths/expressions/numexp.d.ts +0 -19
- package/esm/maths/expressions/numexp.js +0 -186
- package/esm/maths/expressions/numexp.js.map +0 -1
- package/esm/maths/expressions/polynomexp.bkp.d.ts +0 -33
- package/esm/maths/expressions/polynomexp.bkp.js +0 -184
- package/esm/maths/expressions/polynomexp.bkp.js.map +0 -1
- package/esm/maths/expressions/polynomexp.d.ts +0 -52
- package/esm/maths/expressions/polynomexp.js +0 -246
- package/esm/maths/expressions/polynomexp.js.map +0 -1
package/.idea/shelf/Uncommitted_changes_before_Checkout_at_09_11_2023_11_01__Default_Changelist_.xml
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<changelist name="Uncommitted_changes_before_Checkout_at_09_11_2023_11_01_[Default_Changelist]" date="1699524101881" recycled="false" toDelete="true">
|
|
2
|
+
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Checkout_at_09_11_2023_11_01_[Default_Changelist]/shelved.patch" />
|
|
3
|
+
<option name="DESCRIPTION" value="Uncommitted changes before Checkout at 09.11.2023 11:01 [Default Changelist]" />
|
|
4
|
+
</changelist>
|
package/dist/pimath.js
CHANGED
|
@@ -6912,8 +6912,8 @@ var Random;
|
|
|
6912
6912
|
return (new rndFraction_1.rndFraction(config)).generate();
|
|
6913
6913
|
}
|
|
6914
6914
|
Random.fraction = fraction;
|
|
6915
|
-
function number(from, to) {
|
|
6916
|
-
return rndHelpers_1.rndHelpers.randomInt(from, to);
|
|
6915
|
+
function number(from, to, exclude) {
|
|
6916
|
+
return rndHelpers_1.rndHelpers.randomInt(from, to, exclude);
|
|
6917
6917
|
}
|
|
6918
6918
|
Random.number = number;
|
|
6919
6919
|
function numberSym(max, allowZero) {
|
|
@@ -7176,11 +7176,32 @@ class rndHelpers {
|
|
|
7176
7176
|
* @param a (number) : From this value to the second value. If the second is ommited, this value is the max value.
|
|
7177
7177
|
* @param b (number) : To this value. If this is ommited.
|
|
7178
7178
|
*/
|
|
7179
|
-
static randomInt(a, b) {
|
|
7179
|
+
static randomInt(a, b, exclude) {
|
|
7180
7180
|
if (b === undefined) {
|
|
7181
|
-
|
|
7181
|
+
if (a >= 0) {
|
|
7182
|
+
return this.randomInt(0, a);
|
|
7183
|
+
}
|
|
7184
|
+
else {
|
|
7185
|
+
return this.randomInt(a, 0);
|
|
7186
|
+
}
|
|
7187
|
+
}
|
|
7188
|
+
// Same start and end values
|
|
7189
|
+
if (a === b) {
|
|
7190
|
+
return a;
|
|
7191
|
+
}
|
|
7192
|
+
// No exclusion
|
|
7193
|
+
if (exclude === undefined) {
|
|
7194
|
+
return Math.floor(Math.random() * (b - a + 1) + a);
|
|
7195
|
+
}
|
|
7196
|
+
// With exclusion
|
|
7197
|
+
if (Math.abs(b - a) <= exclude.length) {
|
|
7198
|
+
throw new Error('The number of excluded values is too high.');
|
|
7199
|
+
}
|
|
7200
|
+
let r = this.randomInt(a, b);
|
|
7201
|
+
while (exclude.includes(r)) {
|
|
7202
|
+
r = this.randomInt(a, b);
|
|
7182
7203
|
}
|
|
7183
|
-
return
|
|
7204
|
+
return r;
|
|
7184
7205
|
}
|
|
7185
7206
|
/**
|
|
7186
7207
|
* Random integer between -max and max value.
|
|
@@ -7217,7 +7238,7 @@ class rndHelpers {
|
|
|
7217
7238
|
if (arr.length === 0) {
|
|
7218
7239
|
return '';
|
|
7219
7240
|
}
|
|
7220
|
-
return this.
|
|
7241
|
+
return arr[this.randomInt(0, arr.length - 1)];
|
|
7221
7242
|
}
|
|
7222
7243
|
static shuffleArray(arr) {
|
|
7223
7244
|
// The Fisher-Yates algorithm
|