math-exercises 2.2.26 → 2.2.28

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.
Files changed (476) hide show
  1. package/lib/exercises/exercise.d.ts +2 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/exercise.js +1 -1
  4. package/lib/exercises/math/calcul/addAndSub.js +1 -1
  5. package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
  6. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +1 -1
  7. package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +1 -1
  8. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +1 -1
  9. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
  10. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +1 -1
  11. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +1 -1
  12. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +1 -1
  13. package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.js +1 -1
  14. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsDivision.js +1 -1
  16. package/lib/exercises/math/calcul/fractions/fractionsProduct.js +1 -1
  17. package/lib/exercises/math/calcul/fractions/fractionsSum.js +1 -1
  18. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +1 -1
  19. package/lib/exercises/math/calcul/fractions/simplifyFraction.js +1 -1
  20. package/lib/exercises/math/calcul/index.js +1 -0
  21. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +2 -2
  22. package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.js +2 -2
  23. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +2 -2
  24. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +2 -2
  25. package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.js +2 -2
  26. package/lib/exercises/math/calcul/operations/expressionNature.js +1 -1
  27. package/lib/exercises/math/calcul/operations/operationsPriorities.js +2 -2
  28. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +1 -1
  29. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +1 -1
  30. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +2 -2
  31. package/lib/exercises/math/calcul/ordering/decimalOrdering.js +1 -1
  32. package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +1 -1
  33. package/lib/exercises/math/calcul/ordering/framing.js +2 -2
  34. package/lib/exercises/math/calcul/ordering/integerOrdering.js +2 -2
  35. package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +1 -1
  36. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +1 -1
  37. package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +1 -1
  38. package/lib/exercises/math/calcul/proportionality/scaleUsage.js +1 -1
  39. package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
  40. package/lib/exercises/math/calcul/rounding/rounding.js +5 -6
  41. package/lib/exercises/math/calcul/writing/index.d.ts +2 -0
  42. package/lib/exercises/math/calcul/writing/index.d.ts.map +1 -0
  43. package/lib/exercises/math/calcul/writing/index.js +17 -0
  44. package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts +7 -0
  45. package/lib/exercises/math/calcul/writing/numberToFrenchWriting.d.ts.map +1 -0
  46. package/lib/exercises/math/calcul/writing/numberToFrenchWriting.js +67 -0
  47. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -1
  48. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +1 -1
  49. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +1 -1
  50. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +1 -1
  51. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +1 -1
  52. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
  54. package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.js +1 -1
  55. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +3 -3
  56. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +1 -1
  57. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +1 -1
  58. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +1 -1
  59. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +1 -1
  60. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +1 -1
  61. package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +1 -1
  62. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
  63. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +1 -1
  64. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +1 -1
  65. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +2 -2
  66. package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +1 -1
  67. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -2
  68. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -2
  69. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -2
  70. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -2
  71. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +1 -1
  72. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +1 -1
  73. package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +2 -2
  74. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +1 -1
  75. package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
  76. package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +1 -1
  77. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
  78. package/lib/exercises/math/combinatory/anagrams.js +1 -1
  79. package/lib/exercises/math/complex/addComplex.js +1 -1
  80. package/lib/exercises/math/complex/argumentFromAlgebraicComplex.js +1 -1
  81. package/lib/exercises/math/complex/conjugateComplex.ts.js +1 -1
  82. package/lib/exercises/math/complex/conjugateDivideComplex.js +1 -1
  83. package/lib/exercises/math/complex/conjugateMultiplyComplex.js +1 -1
  84. package/lib/exercises/math/complex/divideComplex.js +1 -1
  85. package/lib/exercises/math/complex/inverseComplex.js +1 -1
  86. package/lib/exercises/math/complex/linearCombinaisonComplex.js +1 -1
  87. package/lib/exercises/math/complex/mutiplyComplex.js +1 -1
  88. package/lib/exercises/math/complex/reAndIm.js +2 -2
  89. package/lib/exercises/math/conversion/aeraConversion.js +1 -1
  90. package/lib/exercises/math/conversion/capacityConversion.js +1 -1
  91. package/lib/exercises/math/conversion/hoursToDecimal.js +1 -1
  92. package/lib/exercises/math/conversion/lengthConversion.js +1 -1
  93. package/lib/exercises/math/conversion/massConversion.js +1 -1
  94. package/lib/exercises/math/conversion/volumeCapacityConversion.js +2 -2
  95. package/lib/exercises/math/conversion/volumeConversion.js +1 -1
  96. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
  97. package/lib/exercises/math/derivation/derivative/lnDerivativeTwo.js +1 -1
  98. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +1 -1
  99. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +1 -1
  100. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -2
  101. package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +1 -1
  102. package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +1 -1
  103. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +2 -2
  104. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -1
  105. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +1 -1
  106. package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +2 -2
  107. package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +1 -1
  108. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +1 -1
  109. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
  110. package/lib/exercises/math/functions/affines/leadingCoefficient.js +1 -1
  111. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +1 -1
  112. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +1 -1
  113. package/lib/exercises/math/functions/affines/signFunction.js +2 -2
  114. package/lib/exercises/math/functions/basics/graphicEquation.js +1 -1
  115. package/lib/exercises/math/functions/basics/graphicInequation.js +1 -1
  116. package/lib/exercises/math/functions/basics/imageFunction.js +2 -2
  117. package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -2
  118. package/lib/exercises/math/functions/basics/inverseImageFunction.js +1 -1
  119. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +2 -2
  120. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +3 -3
  121. package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +2 -2
  122. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -2
  123. package/lib/exercises/math/functions/cube/cubicEquation.js +1 -1
  124. package/lib/exercises/math/functions/exponential/expEquation.js +1 -1
  125. package/lib/exercises/math/functions/exponential/expSimplifiying.js +1 -1
  126. package/lib/exercises/math/functions/integral/integralExpU.js +1 -1
  127. package/lib/exercises/math/functions/integral/integralFractions.js +1 -1
  128. package/lib/exercises/math/functions/logarithm/log10Simplifying.js +1 -1
  129. package/lib/exercises/math/functions/logarithm/logEquation.js +1 -1
  130. package/lib/exercises/math/functions/logarithm/logSimplifiying.js +2 -2
  131. package/lib/exercises/math/functions/parity/parityFromAlgebra.js +3 -3
  132. package/lib/exercises/math/functions/parity/parityFromGraph.js +3 -3
  133. package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +1 -1
  134. package/lib/exercises/math/functions/trinoms/alphaBetaFromDevForm.js +2 -2
  135. package/lib/exercises/math/functions/trinoms/alphaBetaInCanonicalForm.js +2 -2
  136. package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.js +1 -1
  137. package/lib/exercises/math/functions/trinoms/deltaTrinom.js +1 -1
  138. package/lib/exercises/math/functions/trinoms/extremumFromCanonicalForm.js +1 -1
  139. package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +2 -2
  140. package/lib/exercises/math/functions/trinoms/factorizedFormFromRoots.js +1 -1
  141. package/lib/exercises/math/functions/trinoms/niceRootsFromDevForm.js +1 -1
  142. package/lib/exercises/math/functions/trinoms/rootsFromDevForm.js +1 -1
  143. package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +1 -1
  144. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
  145. package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +2 -2
  146. package/lib/exercises/math/geometry/areas/circleArea.js +2 -2
  147. package/lib/exercises/math/geometry/areas/rectangleArea.js +1 -1
  148. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +1 -1
  149. package/lib/exercises/math/geometry/areas/squareArea.js +1 -1
  150. package/lib/exercises/math/geometry/areas/triangleArea.js +1 -1
  151. package/lib/exercises/math/geometry/areas/triangleAreaV2.js +1 -1
  152. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +1 -1
  153. package/lib/exercises/math/geometry/cartesian/index.d.ts +4 -0
  154. package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
  155. package/lib/exercises/math/geometry/cartesian/index.js +4 -0
  156. package/lib/exercises/math/geometry/cartesian/midpoint.js +1 -1
  157. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
  158. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts +13 -0
  159. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts.map +1 -0
  160. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.js +133 -0
  161. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts +13 -0
  162. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -0
  163. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +132 -0
  164. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +1 -1
  165. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts +13 -0
  166. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -0
  167. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +152 -0
  168. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts +13 -0
  169. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -0
  170. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +153 -0
  171. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +1 -1
  172. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
  173. package/lib/exercises/math/geometry/perimeters/circleCircumference.js +2 -2
  174. package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +1 -1
  175. package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +1 -1
  176. package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +1 -1
  177. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +2 -2
  178. package/lib/exercises/math/geometry/thales/thales.js +1 -1
  179. package/lib/exercises/math/geometry/thales/thalesCalcul.js +2 -2
  180. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +2 -2
  181. package/lib/exercises/math/geometry/vectors/chasles.js +2 -2
  182. package/lib/exercises/math/geometry/vectors/colinearity.js +2 -2
  183. package/lib/exercises/math/geometry/vectors/determinant.js +1 -1
  184. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -2
  185. package/lib/exercises/math/geometry/vectors/fourthParallelogramPoint.js +1 -1
  186. package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +2 -2
  187. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +2 -2
  188. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +1 -1
  189. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
  190. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +1 -1
  191. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +1 -1
  192. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +1 -1
  193. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +1 -1
  194. package/lib/exercises/math/limits/limitReading.js +1 -1
  195. package/lib/exercises/math/limits/polynomLimit.js +2 -2
  196. package/lib/exercises/math/limits/polynomLimitNoFI.js +2 -2
  197. package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.js +1 -1
  198. package/lib/exercises/math/limits/rationalFracLimit.js +2 -2
  199. package/lib/exercises/math/limits/sequencePolynomLimit.js +1 -1
  200. package/lib/exercises/math/limits/sequencePolynomNoFILimit.js +1 -1
  201. package/lib/exercises/math/limits/sequencePolynomProductLimit.js +1 -1
  202. package/lib/exercises/math/limits/sequenceRationalFracLimit.js +1 -1
  203. package/lib/exercises/math/percent/applyPercent.js +2 -2
  204. package/lib/exercises/math/percent/averageEvolutionRate.js +1 -1
  205. package/lib/exercises/math/percent/cmToEvolution.js +1 -1
  206. package/lib/exercises/math/percent/evolutionRateFromValues.d.ts +8 -0
  207. package/lib/exercises/math/percent/evolutionRateFromValues.d.ts.map +1 -0
  208. package/lib/exercises/math/percent/evolutionRateFromValues.js +71 -0
  209. package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts +8 -0
  210. package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts.map +1 -0
  211. package/lib/exercises/math/percent/findStartValueAfterEvolution.js +65 -0
  212. package/lib/exercises/math/percent/findTVA.js +2 -2
  213. package/lib/exercises/math/percent/globalPercent.js +1 -1
  214. package/lib/exercises/math/percent/htToTTC.js +2 -2
  215. package/lib/exercises/math/percent/index.d.ts +4 -0
  216. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  217. package/lib/exercises/math/percent/index.js +4 -0
  218. package/lib/exercises/math/percent/isTableProportional.js +1 -1
  219. package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
  220. package/lib/exercises/math/percent/percentToDecimal.js +70 -27
  221. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts +9 -0
  222. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -0
  223. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +93 -0
  224. package/lib/exercises/math/percent/reciprocalPercentage.js +2 -2
  225. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts +9 -0
  226. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts.map +1 -0
  227. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.js +85 -0
  228. package/lib/exercises/math/percent/ttcToHT.js +2 -2
  229. package/lib/exercises/math/powers/decimalToScientific.js +1 -1
  230. package/lib/exercises/math/powers/powersDivision.js +1 -1
  231. package/lib/exercises/math/powers/powersOfTenToDecimal.js +1 -1
  232. package/lib/exercises/math/powers/powersProduct.js +1 -1
  233. package/lib/exercises/math/primitive/constantPrimitive.js +1 -1
  234. package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
  235. package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -1
  236. package/lib/exercises/math/primitive/sinCosPrimitive.js +2 -2
  237. package/lib/exercises/math/primitive/sinUCosUPrimitive.js +2 -2
  238. package/lib/exercises/math/probaStat/cardBasicProbas.js +2 -2
  239. package/lib/exercises/math/probaStat/conditionalProbability.js +1 -1
  240. package/lib/exercises/math/probaStat/diceBasicProbas.js +2 -2
  241. package/lib/exercises/math/probaStat/independancy.js +2 -2
  242. package/lib/exercises/math/probaStat/issuesCountingForCards.js +3 -3
  243. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +1 -1
  244. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
  245. package/lib/exercises/math/probaStat/probabilityTree.js +1 -1
  246. package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +1 -1
  247. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  248. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -1
  249. package/lib/exercises/math/probaStat/stats1var/median.js +1 -1
  250. package/lib/exercises/math/probaStat/stats1var/quartiles.js +1 -1
  251. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
  252. package/lib/exercises/math/python/pyForLoop1Exercise.js +2 -2
  253. package/lib/exercises/math/python/pyNestedForLoopExercise.js +1 -1
  254. package/lib/exercises/math/python/pyWhileLoop1Exercise.js +1 -1
  255. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -1
  256. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +1 -1
  257. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +1 -1
  258. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +1 -1
  259. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +1 -1
  260. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +1 -1
  261. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +1 -1
  262. package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.js +1 -1
  263. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +1 -1
  264. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +1 -1
  265. package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.js +1 -1
  266. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +2 -2
  267. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +2 -2
  268. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
  269. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +1 -1
  270. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +1 -1
  271. package/lib/exercises/math/sequences/geometric/geometricFindReason.js +1 -1
  272. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +1 -1
  273. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +1 -1
  274. package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +1 -1
  275. package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +1 -1
  276. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +1 -1
  277. package/lib/exercises/math/sequences/sequencePlot.js +1 -1
  278. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +1 -1
  279. package/lib/exercises/math/sets/intervals/intervalToInequality.js +1 -1
  280. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +1 -1
  281. package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
  282. package/lib/exercises/math/sets/setBelonging.js +2 -2
  283. package/lib/exercises/math/squareRoots/simpifySquareRoot.js +1 -1
  284. package/lib/exercises/math/squareRoots/squareRootEquation.js +1 -1
  285. package/lib/exercises/math/squareRoots/squareRootIdentities.js +2 -2
  286. package/lib/exercises/math/squareRoots/squareRootsSum.js +1 -1
  287. package/lib/exercises/math/trigonometry/arcLength.d.ts +10 -0
  288. package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -0
  289. package/lib/exercises/math/trigonometry/arcLength.js +92 -0
  290. package/lib/exercises/math/trigonometry/associatePoint.js +1 -1
  291. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts +7 -0
  292. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -0
  293. package/lib/exercises/math/trigonometry/basicEquationCos.js +94 -0
  294. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts +7 -0
  295. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -0
  296. package/lib/exercises/math/trigonometry/basicEquationSin.js +106 -0
  297. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts +7 -0
  298. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts.map +1 -0
  299. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.js +85 -0
  300. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +1 -1
  301. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts +9 -0
  302. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -0
  303. package/lib/exercises/math/trigonometry/degreeToRadians.js +125 -0
  304. package/lib/exercises/math/trigonometry/index.d.ts +6 -0
  305. package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
  306. package/lib/exercises/math/trigonometry/index.js +6 -0
  307. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts +9 -0
  308. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -0
  309. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +91 -0
  310. package/lib/exercises/math/trigonometry/mainRemarkableValues.js +2 -2
  311. package/lib/exercises/math/trigonometry/remarkableValues.js +3 -3
  312. package/lib/exercises/math/trigonometry/trigonometry.js +1 -1
  313. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +1 -1
  314. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -1
  315. package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -2
  316. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  317. package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +2 -2
  318. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +1 -1
  319. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
  320. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
  321. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
  322. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
  323. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +2 -2
  324. package/lib/exercises/pc/chemicalEquations.js +1 -1
  325. package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +1 -1
  326. package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
  327. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
  328. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -1
  329. package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
  330. package/lib/exercises/pc/delution.js +1 -1
  331. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -1
  332. package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +1 -1
  333. package/lib/exercises/pc/electricity/calculateVoltage.js +1 -1
  334. package/lib/exercises/pc/electricity/electricEnergyFromPower.js +1 -1
  335. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +2 -2
  336. package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +1 -1
  337. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
  338. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +2 -2
  339. package/lib/exercises/pc/fluids/mariotte.js +1 -1
  340. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -1
  341. package/lib/exercises/pc/forces/forceWork.js +1 -1
  342. package/lib/exercises/pc/forces/massWeight.js +1 -1
  343. package/lib/exercises/pc/forces/pressingForce.js +1 -1
  344. package/lib/exercises/pc/formulaFromComposition.js +1 -1
  345. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +2 -2
  346. package/lib/exercises/pc/kineticEnergy.js +1 -1
  347. package/lib/exercises/pc/math/isolateVariables.js +1 -1
  348. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +1 -1
  349. package/lib/exercises/pc/molarQuantity.js +1 -1
  350. package/lib/exercises/pc/mole/molarMass.js +1 -1
  351. package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +1 -1
  352. package/lib/exercises/pc/moleculeFormula.js +1 -1
  353. package/lib/exercises/pc/moleculeNomenclature.js +1 -1
  354. package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
  355. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +1 -1
  356. package/lib/exercises/pc/motion/motionReference.js +1 -1
  357. package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
  358. package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
  359. package/lib/exercises/pc/pH.js +1 -1
  360. package/lib/exercises/pc/perceivedFrequency.js +1 -1
  361. package/lib/exercises/pc/potentialEnergy.js +1 -1
  362. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
  363. package/lib/exercises/pc/snellDescartes.js +1 -1
  364. package/lib/exercises/pc/sound/findPeriodFromGraph.js +1 -1
  365. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +1 -1
  366. package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
  367. package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -1
  368. package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -1
  369. package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -1
  370. package/lib/exercises/utils/getDistinctQuestions.d.ts +1 -1
  371. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  372. package/lib/exercises/utils/getDistinctQuestions.js +11 -5
  373. package/lib/geogebra/colors.js +1 -1
  374. package/lib/geogebra/geogebraConstructor.js +1 -1
  375. package/lib/geogebra/parsers/ggbPointToCoords.d.ts +5 -0
  376. package/lib/geogebra/parsers/ggbPointToCoords.d.ts.map +1 -0
  377. package/lib/geogebra/parsers/ggbPointToCoords.js +12 -0
  378. package/lib/geogebra/parsers/parseGGBPoints.d.ts +2 -0
  379. package/lib/geogebra/parsers/parseGGBPoints.d.ts.map +1 -0
  380. package/lib/geogebra/parsers/parseGGBPoints.js +10 -0
  381. package/lib/index.d.ts +61 -0
  382. package/lib/index.d.ts.map +1 -1
  383. package/lib/math/geometry/line.d.ts.map +1 -1
  384. package/lib/math/geometry/line.js +0 -1
  385. package/lib/math/inequations/inequation.js +1 -1
  386. package/lib/math/numbers/decimals/decimal.d.ts +1 -0
  387. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  388. package/lib/math/numbers/decimals/decimal.js +10 -0
  389. package/lib/math/numbers/integer/integer.d.ts +2 -0
  390. package/lib/math/numbers/integer/integer.d.ts.map +1 -1
  391. package/lib/math/numbers/integer/integer.js +10 -1
  392. package/lib/math/numbers/nombre.js +1 -1
  393. package/lib/math/numbers/rationals/rational.js +3 -3
  394. package/lib/math/numbers/reals/real.js +2 -2
  395. package/lib/math/polynomials/polynomial.js +1 -1
  396. package/lib/math/polynomials/trinom.js +1 -1
  397. package/lib/math/sequences/geometricSequence.d.ts +2 -2
  398. package/lib/math/sequences/geometricSequence.d.ts.map +1 -1
  399. package/lib/math/sequences/geometricSequence.js +13 -11
  400. package/lib/math/sets/discreteSet.d.ts +2 -2
  401. package/lib/math/sets/discreteSet.d.ts.map +1 -1
  402. package/lib/math/sets/discreteSet.js +4 -4
  403. package/lib/math/sets/intervals/intervals.js +1 -1
  404. package/lib/math/trigonometry/remarkableValue.js +1 -1
  405. package/lib/math/trigonometry/remarkableValues.d.ts +3 -0
  406. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
  407. package/lib/math/trigonometry/remarkableValues.js +72 -1
  408. package/lib/math/utils/random/randTupleInt.js +1 -1
  409. package/lib/playground.d.ts.map +1 -1
  410. package/lib/playground.js +1 -10
  411. package/lib/tree/nodes/equations/multiEqualNode.js +2 -2
  412. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  413. package/lib/tree/nodes/geometry/degree.js +3 -2
  414. package/lib/tree/nodes/geometry/pointNode.js +1 -1
  415. package/lib/tree/nodes/inequations/inequationNode.js +1 -1
  416. package/lib/tree/nodes/operators/addNode.js +3 -3
  417. package/lib/tree/nodes/operators/divideNode.js +1 -1
  418. package/lib/tree/nodes/operators/multiplyNode.js +3 -3
  419. package/lib/tree/nodes/operators/substractNode.js +1 -1
  420. package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
  421. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  422. package/lib/tree/nodes/sets/discreteSetNode.js +8 -2
  423. package/lib/tree/nodes/sets/intervalNode.js +1 -1
  424. package/lib/tree/nodes/sets/unionIntervalNode.js +2 -2
  425. package/lib/tree/parsers/euroParser.d.ts +2 -0
  426. package/lib/tree/parsers/euroParser.d.ts.map +1 -0
  427. package/lib/tree/parsers/euroParser.js +12 -0
  428. package/lib/tree/parsers/percentParser.d.ts +1 -0
  429. package/lib/tree/parsers/percentParser.d.ts.map +1 -1
  430. package/lib/tree/parsers/percentParser.js +11 -0
  431. package/lib/utils/alea/coinFlip.d.ts +2 -0
  432. package/lib/utils/alea/coinFlip.d.ts.map +1 -0
  433. package/lib/utils/alea/coinFlip.js +7 -0
  434. package/lib/utils/alea/diceFlip.d.ts +2 -0
  435. package/lib/utils/alea/diceFlip.d.ts.map +1 -0
  436. package/lib/utils/alea/diceFlip.js +8 -0
  437. package/lib/utils/alea/probaFlip.d.ts +7 -0
  438. package/lib/utils/alea/probaFlip.d.ts.map +1 -0
  439. package/lib/utils/alea/probaFlip.js +12 -0
  440. package/lib/utils/alea/probaLawFlip.d.ts +7 -0
  441. package/lib/utils/alea/probaLawFlip.d.ts.map +1 -0
  442. package/lib/utils/alea/probaLawFlip.js +24 -0
  443. package/lib/utils/alea/random.d.ts +2 -0
  444. package/lib/utils/alea/random.d.ts.map +1 -0
  445. package/lib/utils/alea/random.js +7 -0
  446. package/lib/utils/alea/randomEnumValue.d.ts +2 -0
  447. package/lib/utils/alea/randomEnumValue.d.ts.map +1 -0
  448. package/lib/utils/alea/randomEnumValue.js +9 -0
  449. package/lib/utils/alea/shuffle.d.ts +2 -0
  450. package/lib/utils/alea/shuffle.d.ts.map +1 -0
  451. package/lib/utils/alea/shuffle.js +15 -0
  452. package/lib/utils/arrays/arrayEqual.d.ts +2 -0
  453. package/lib/utils/arrays/arrayEqual.d.ts.map +1 -0
  454. package/lib/utils/arrays/arrayEqual.js +13 -0
  455. package/lib/utils/arrays/arrayHasSameElement.d.ts +2 -0
  456. package/lib/utils/arrays/arrayHasSameElement.d.ts.map +1 -0
  457. package/lib/utils/arrays/arrayHasSameElement.js +8 -0
  458. package/lib/utils/arrays/cartesianProducts.d.ts +13 -0
  459. package/lib/utils/arrays/cartesianProducts.d.ts.map +1 -0
  460. package/lib/utils/arrays/cartesianProducts.js +64 -0
  461. package/lib/utils/arrays/enumToArray.d.ts +8 -0
  462. package/lib/utils/arrays/enumToArray.d.ts.map +1 -0
  463. package/lib/utils/arrays/enumToArray.js +16 -0
  464. package/lib/utils/arrays/permutations.d.ts +2 -0
  465. package/lib/utils/arrays/permutations.d.ts.map +1 -0
  466. package/lib/utils/arrays/permutations.js +21 -0
  467. package/lib/utils/latex/alignTex.d.ts +1 -1
  468. package/lib/utils/latex/alignTex.d.ts.map +1 -1
  469. package/lib/utils/latex/alignTex.js +3 -3
  470. package/lib/utils/strings/frenchNumbers.d.ts +6 -0
  471. package/lib/utils/strings/frenchNumbers.d.ts.map +1 -0
  472. package/lib/utils/strings/frenchNumbers.js +50 -0
  473. package/lib/utils/strings/numberToFrenchWord.d.ts +2 -0
  474. package/lib/utils/strings/numberToFrenchWord.d.ts.map +1 -0
  475. package/lib/utils/strings/numberToFrenchWord.js +81 -0
  476. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { Nombre } from '../numbers/nombre';
2
- import { MathSetInterface } from './mathSetInterface';
1
+ import { Nombre } from "../numbers/nombre";
2
+ import { MathSetInterface } from "./mathSetInterface";
3
3
  export declare class DiscreteSet implements MathSetInterface {
4
4
  elements: Nombre[];
5
5
  tex: string;
@@ -1 +1 @@
1
- {"version":3,"file":"discreteSet.d.ts","sourceRoot":"","sources":["../../../src/math/sets/discreteSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,WAAY,YAAW,gBAAgB;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;gBACA,QAAQ,EAAE,MAAM,EAAE;IAW9B,KAAK,IAAI,MAAM;IAIf,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAI7B,gBAAgB,IAAI,MAAM;CAG3B"}
1
+ {"version":3,"file":"discreteSet.d.ts","sourceRoot":"","sources":["../../../src/math/sets/discreteSet.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,WAAY,YAAW,gBAAgB;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;gBACA,QAAQ,EAAE,MAAM,EAAE;IAW9B,KAAK,IAAI,MAAM;IAIf,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAM7B,gBAAgB,IAAI,MAAM;CAG3B"}
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DiscreteSet = void 0;
4
- const random_1 = require("../../utils/random");
4
+ const random_1 = require("../../utils/alea/random");
5
5
  class DiscreteSet {
6
6
  constructor(elements) {
7
7
  this.elements = Array.from(new Set(elements));
8
- let tex = '\\{';
8
+ let tex = "\\{";
9
9
  this.elements.forEach((el, index) => {
10
10
  tex += el.tex;
11
11
  if (index < this.elements.length - 1)
12
- tex += ';';
12
+ tex += ";";
13
13
  else
14
- tex += '\\}';
14
+ tex += "\\}";
15
15
  });
16
16
  this.tex = tex;
17
17
  }
@@ -6,7 +6,7 @@ const infiniteNode_1 = require("../../../tree/nodes/numbers/infiniteNode");
6
6
  const closure_1 = require("../../../tree/nodes/sets/closure");
7
7
  const discreteSetNode_1 = require("../../../tree/nodes/sets/discreteSetNode");
8
8
  const intervalNode_1 = require("../../../tree/nodes/sets/intervalNode");
9
- const coinFlip_1 = require("../../../utils/coinFlip");
9
+ const coinFlip_1 = require("../../../utils/alea/coinFlip");
10
10
  const mathSet_1 = require("../mathSet");
11
11
  class IntervalConstructor {
12
12
  static random() {
@@ -5,7 +5,7 @@ const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
5
5
  const piNode_1 = require("../../tree/nodes/numbers/piNode");
6
6
  const addNode_1 = require("../../tree/nodes/operators/addNode");
7
7
  const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
8
- const random_1 = require("../../utils/random");
8
+ const random_1 = require("../../utils/alea/random");
9
9
  const randint_1 = require("../utils/random/randint");
10
10
  const remarkableValues_1 = require("./remarkableValues");
11
11
  class RemarkableValueConstructor {
@@ -7,5 +7,8 @@ export interface RemarkableValue {
7
7
  tan: AlgebraicNode;
8
8
  point: string;
9
9
  }
10
+ export declare const negativeMainTrigovalues: RemarkableValue[];
10
11
  export declare const remarkableTrigoValues: RemarkableValue[];
12
+ export declare const mainTrigoValues: RemarkableValue[];
13
+ export declare const mainPositiveTrigovalues: RemarkableValue[];
11
14
  //# sourceMappingURL=remarkableValues.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../src/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAQ/D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,aAAa,CAAC;IACnB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,qBAAqB,EAAE,eAAe,EA2LlD,CAAC"}
1
+ {"version":3,"file":"remarkableValues.d.ts","sourceRoot":"","sources":["../../../src/math/trigonometry/remarkableValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAQ/D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,aAAa,CAAC;IACnB,GAAG,EAAE,aAAa,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,uBAAuB,EAAE,eAAe,EAoGpD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAAe,EA2LlD,CAAC;AAEF,eAAO,MAAM,eAAe,mBAG3B,CAAC;AAEF,eAAO,MAAM,uBAAuB,mBAAoC,CAAC"}
@@ -1,12 +1,78 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.remarkableTrigoValues = void 0;
3
+ exports.mainPositiveTrigovalues = exports.mainTrigoValues = exports.remarkableTrigoValues = exports.negativeMainTrigovalues = void 0;
4
4
  const oppositeNode_1 = require("../../tree/nodes/functions/oppositeNode");
5
5
  const sqrtNode_1 = require("../../tree/nodes/functions/sqrtNode");
6
6
  const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
7
7
  const piNode_1 = require("../../tree/nodes/numbers/piNode");
8
8
  const fractionNode_1 = require("../../tree/nodes/operators/fractionNode");
9
9
  const multiplyNode_1 = require("../../tree/nodes/operators/multiplyNode");
10
+ exports.negativeMainTrigovalues = [
11
+ {
12
+ angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(5), piNode_1.PiNode), new numberNode_1.NumberNode(6))),
13
+ degree: 210,
14
+ cos: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2))),
15
+ sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2))),
16
+ tan: new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3))),
17
+ point: "H",
18
+ },
19
+ {
20
+ angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(3), piNode_1.PiNode), new numberNode_1.NumberNode(4))),
21
+ degree: 225,
22
+ cos: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2))),
23
+ sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2))),
24
+ tan: new numberNode_1.NumberNode(1),
25
+ point: "K",
26
+ },
27
+ {
28
+ angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(2), piNode_1.PiNode), new numberNode_1.NumberNode(3))),
29
+ degree: 240,
30
+ cos: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2))),
31
+ sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2))),
32
+ tan: new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)),
33
+ point: "L",
34
+ },
35
+ {
36
+ angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(2))),
37
+ degree: 270,
38
+ cos: new numberNode_1.NumberNode(0),
39
+ sin: new numberNode_1.NumberNode(-1),
40
+ tan: new numberNode_1.NumberNode(Infinity),
41
+ point: "M",
42
+ },
43
+ {
44
+ angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(3))),
45
+ degree: 300,
46
+ cos: new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2)),
47
+ sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2))),
48
+ tan: new oppositeNode_1.OppositeNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3))),
49
+ point: "N",
50
+ },
51
+ {
52
+ angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(4))),
53
+ degree: 315,
54
+ cos: new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2)),
55
+ sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(2)), new numberNode_1.NumberNode(2))),
56
+ tan: new oppositeNode_1.OppositeNode(new numberNode_1.NumberNode(1)),
57
+ point: "P",
58
+ },
59
+ {
60
+ angle: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(piNode_1.PiNode, new numberNode_1.NumberNode(6))),
61
+ degree: 330,
62
+ cos: new fractionNode_1.FractionNode(new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)), new numberNode_1.NumberNode(2)),
63
+ sin: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new numberNode_1.NumberNode(2))),
64
+ tan: new oppositeNode_1.OppositeNode(new fractionNode_1.FractionNode(new numberNode_1.NumberNode(1), new sqrtNode_1.SqrtNode(new numberNode_1.NumberNode(3)))),
65
+ point: "Q",
66
+ },
67
+ {
68
+ angle: new numberNode_1.NumberNode(0),
69
+ degree: 0,
70
+ cos: new numberNode_1.NumberNode(1),
71
+ sin: new numberNode_1.NumberNode(0),
72
+ tan: new numberNode_1.NumberNode(0),
73
+ point: "I",
74
+ },
75
+ ];
10
76
  exports.remarkableTrigoValues = [
11
77
  {
12
78
  angle: new numberNode_1.NumberNode(0),
@@ -137,3 +203,8 @@ exports.remarkableTrigoValues = [
137
203
  point: "Q",
138
204
  },
139
205
  ];
206
+ exports.mainTrigoValues = [
207
+ ...exports.negativeMainTrigovalues,
208
+ ...exports.remarkableTrigoValues.slice(1).slice(0, 8),
209
+ ];
210
+ exports.mainPositiveTrigovalues = exports.remarkableTrigoValues.slice(0, 9);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.distinctRandTupleInt = exports.randTupleInt = void 0;
4
- const arrayEqual_1 = require("../../../utils/arrayEqual");
4
+ const arrayEqual_1 = require("../../../utils/arrays/arrayEqual");
5
5
  const randint_1 = require("./randint");
6
6
  /**
7
7
  * @param size tuple length
@@ -1 +1 @@
1
- {"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,UAAU,YAWtB,CAAC"}
1
+ {"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,UAAU,YAEtB,CAAC"}
package/lib/playground.js CHANGED
@@ -2,15 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.playground = void 0;
4
4
  const playground = () => {
5
- // const affine1 = new Affine(4, 5);
6
- // const affine2 = new Affine(2, 3);
7
- // const tree = affine1.toTree({ toTexOptions: { color: "green" } });
8
- // console.log(tree.opts);
9
- // console.log(tree.toTex());
10
- // const node = new MultiplyNode(
11
- // affine1.toTree({ toTexOptions: { color: "green" } }),
12
- // new (coinFlip() ? SubstractNode : AddNode)(affine2.toTree(), (1).toTree()),
13
- // ).toTex();
14
- // console.log(node);
5
+ // console.log(mainTrigoValues.map((e) => e.angle.toTex()));
15
6
  };
16
7
  exports.playground = playground;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MultiEqualNode = void 0;
4
4
  const node_1 = require("../node");
5
- const permutations_1 = require("../../../utils/permutations");
6
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
+ const permutations_1 = require("../../../utils/arrays/permutations");
6
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
7
7
  class MultiEqualNode {
8
8
  constructor(children, opts) {
9
9
  this.children = children;
@@ -1 +1 @@
1
- {"version":3,"file":"degree.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/geometry/degree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,aAAa;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAmB;IACjC,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAO5D,aAAa;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,cAAc;IAOd,iBAAiB;IAGjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,QAAQ;IAGR,MAAM,CAAC,IAAI,EAAE,aAAa;CAG3B"}
1
+ {"version":3,"file":"degree.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/geometry/degree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,aAAa;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAmB;IACjC,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAO5D,aAAa;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,cAAc;IAQd,iBAAiB;IAGjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,QAAQ;IAGR,MAAM,CAAC,IAAI,EAAE,aAAa;CAG3B"}
@@ -11,8 +11,8 @@ class DegreeNode {
11
11
  this.type = node_1.NodeType.number;
12
12
  this.value = value;
13
13
  this.tex =
14
- (tex?.replace(".", ",") || (value + "").replace(".", ",")) + `^\\circ`;
15
- this.mathString = mathString || this.value + "^\\circ";
14
+ (tex?.replace(".", ",") || (value + "").replace(".", ",")) + `^{\\circ}`;
15
+ this.mathString = mathString || this.value + "^\\{\\circ\\}";
16
16
  this.isNumeric = true;
17
17
  }
18
18
  toIdentifiers() {
@@ -33,6 +33,7 @@ class DegreeNode {
33
33
  toAllValidTexs() {
34
34
  const res = [];
35
35
  res.push(this.tex);
36
+ res.push(this.value.frenchify());
36
37
  //!est-ce vraiment nécessaire sachant que les inputs students n'auront en théorie jamais de "."
37
38
  if (this.tex.includes(","))
38
39
  res.push(this.tex.replace(",", "."));
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PointNode = void 0;
4
4
  const point_1 = require("../../../math/geometry/point");
5
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
6
6
  const node_1 = require("../node");
7
7
  class PointNode {
8
8
  constructor(point, opts) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InequationNode = void 0;
4
4
  const inequation_1 = require("../../../math/inequations/inequation");
5
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
6
6
  const isLetter_1 = require("../../../utils/strings/isLetter");
7
7
  const node_1 = require("../node");
8
8
  const infiniteNode_1 = require("../numbers/infiniteNode");
@@ -4,9 +4,9 @@ exports.AddNode = exports.isAddNode = void 0;
4
4
  // import { add } from "mathjs";
5
5
  const node_1 = require("../node");
6
6
  const operatorNode_1 = require("./operatorNode");
7
- const coinFlip_1 = require("../../../utils/coinFlip");
8
- const permutations_1 = require("../../../utils/permutations");
9
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
7
+ const coinFlip_1 = require("../../../utils/alea/coinFlip");
8
+ const permutations_1 = require("../../../utils/arrays/permutations");
9
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
10
10
  const operatorComposition_1 = require("../../../tree/utilities/operatorComposition");
11
11
  const substractNode_1 = require("./substractNode");
12
12
  const oppositeNode_1 = require("../functions/oppositeNode");
@@ -4,7 +4,7 @@ exports.DivideNode = exports.isDivideNode = void 0;
4
4
  // import { divide } from "mathjs";
5
5
  const node_1 = require("../node");
6
6
  const operatorNode_1 = require("./operatorNode");
7
- const coinFlip_1 = require("../../../utils/coinFlip");
7
+ const coinFlip_1 = require("../../../utils/alea/coinFlip");
8
8
  function isDivideNode(a) {
9
9
  return (0, operatorNode_1.isOperatorNode)(a) && a.id === operatorNode_1.OperatorIds.divide;
10
10
  }
@@ -4,9 +4,9 @@ exports.MultiplyNode = exports.sortMultiplyNodes = exports.isMultiplyNode = void
4
4
  // import { multiply } from "mathjs";
5
5
  const node_1 = require("../node");
6
6
  const operatorNode_1 = require("./operatorNode");
7
- const coinFlip_1 = require("../../../utils/coinFlip");
8
- const permutations_1 = require("../../../utils/permutations");
9
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
7
+ const coinFlip_1 = require("../../../utils/alea/coinFlip");
8
+ const permutations_1 = require("../../../utils/arrays/permutations");
9
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
10
10
  const operatorComposition_1 = require("../../../tree/utilities/operatorComposition");
11
11
  const powerNode_1 = require("./powerNode");
12
12
  const numberNode_1 = require("../numbers/numberNode");
@@ -6,7 +6,7 @@ const node_1 = require("../node");
6
6
  const operatorNode_1 = require("./operatorNode");
7
7
  const oppositeNode_1 = require("../functions/oppositeNode");
8
8
  const addNode_1 = require("./addNode");
9
- const coinFlip_1 = require("../../../utils/coinFlip");
9
+ const coinFlip_1 = require("../../../utils/alea/coinFlip");
10
10
  const colorize_1 = require("../../../utils/latex/colorize");
11
11
  function isSubstractNode(a) {
12
12
  return (0, operatorNode_1.isOperatorNode)(a) && a.id === operatorNode_1.OperatorIds.substract;
@@ -20,6 +20,7 @@ export declare class DiscreteSetNode implements SetNode {
20
20
  toMathString(): string;
21
21
  toMathjs(): string;
22
22
  toTex(): string;
23
+ toDeleteRandomElement(): DiscreteSetNode;
23
24
  }
24
25
  export declare const EmptySet: DiscreteSetNode;
25
26
  //# sourceMappingURL=discreteSetNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"discreteSetNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/discreteSetNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AACvD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,eAAe,CAE/D;AACD,qBAAa,eAAgB,YAAW,OAAO;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;gBACL,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAOhD,UAAU;IAGV,cAAc;IAGd,aAAa;;;;;;IAMb,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAyBpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;CAMN;AAED,eAAO,MAAM,QAAQ,iBAA0B,CAAC"}
1
+ {"version":3,"file":"discreteSetNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/discreteSetNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AACvD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,eAAe,CAE/D;AACD,qBAAa,eAAgB,YAAW,OAAO;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;gBACL,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAOhD,UAAU;IAGV,cAAc;IAGd,aAAa;;;;;;IAMb,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAyBpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;IAOL,qBAAqB;CAMtB;AAED,eAAO,MAAM,QAAQ,iBAA0B,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EmptySet = exports.DiscreteSetNode = exports.isDiscreteSetNode = void 0;
4
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
- const permutations_1 = require("../../../utils/permutations");
4
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
5
+ const permutations_1 = require("../../../utils/arrays/permutations");
6
6
  const node_1 = require("../node");
7
7
  const setNode_1 = require("./setNode");
8
8
  function isDiscreteSetNode(a) {
@@ -65,6 +65,12 @@ class DiscreteSetNode {
65
65
  .map((el) => el.toTex())
66
66
  .join(";")}\\right\\}`;
67
67
  }
68
+ toDeleteRandomElement() {
69
+ const index = Math.floor(Math.random() * this.elements.length);
70
+ const newElements = [...this.elements];
71
+ newElements.splice(index, 1);
72
+ return new DiscreteSetNode(newElements);
73
+ }
68
74
  }
69
75
  exports.DiscreteSetNode = DiscreteSetNode;
70
76
  exports.EmptySet = new DiscreteSetNode([]);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IntervalNode = exports.isIntervalNode = void 0;
4
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
4
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
5
5
  const inequationNode_1 = require("../inequations/inequationNode");
6
6
  const node_1 = require("../node");
7
7
  const constantNode_1 = require("../numbers/constantNode");
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UnionIntervalNode = exports.UnionIntervalNodeBuilder = exports.isUnionIntervalNode = void 0;
4
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
- const permutations_1 = require("../../../utils/permutations");
4
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
5
+ const permutations_1 = require("../../../utils/arrays/permutations");
6
6
  const node_1 = require("../node");
7
7
  const infiniteNode_1 = require("../numbers/infiniteNode");
8
8
  const closure_1 = require("./closure");
@@ -0,0 +1,2 @@
1
+ export declare const euroParser: (ans: string, allowNoEuroSign?: boolean) => string | false;
2
+ //# sourceMappingURL=euroParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"euroParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/euroParser.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAAS,MAAM,8CAKrC,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.euroParser = void 0;
4
+ const euroParser = (ans, allowNoEuroSign = true) => {
5
+ if (!allowNoEuroSign && !ans.includes("€"))
6
+ return false;
7
+ const nb = ans.replace("€", "").unfrenchify();
8
+ if (isNaN(nb))
9
+ return false;
10
+ return nb.frenchify() + "€";
11
+ };
12
+ exports.euroParser = euroParser;
@@ -1 +1,2 @@
1
+ export declare const percentParser: (ans: string, allowNoPercentSign?: boolean) => string | false;
1
2
  //# sourceMappingURL=percentParser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"percentParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/percentParser.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"percentParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/percentParser.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAAS,MAAM,iDAKxC,CAAC"}
@@ -1 +1,12 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.percentParser = void 0;
4
+ const percentParser = (ans, allowNoPercentSign = true) => {
5
+ if (!allowNoPercentSign && !ans.includes("\\%"))
6
+ return false;
7
+ const nb = ans.replace("\\%", "").unfrenchify();
8
+ if (isNaN(nb))
9
+ return false;
10
+ return nb.frenchify() + "\\%";
11
+ };
12
+ exports.percentParser = percentParser;
@@ -0,0 +1,2 @@
1
+ export declare const coinFlip: () => boolean;
2
+ //# sourceMappingURL=coinFlip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coinFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/coinFlip.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,QAAO,OAE3B,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.coinFlip = void 0;
4
+ const coinFlip = () => {
5
+ return Math.random() < 0.5;
6
+ };
7
+ exports.coinFlip = coinFlip;
@@ -0,0 +1,2 @@
1
+ export declare const diceFlip: (faces: number) => number;
2
+ //# sourceMappingURL=diceFlip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diceFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/diceFlip.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,UAAW,MAAM,WAErC,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.diceFlip = void 0;
4
+ const randint_1 = require("../../math/utils/random/randint");
5
+ const diceFlip = (faces) => {
6
+ return (0, randint_1.randint)(1, faces + 1);
7
+ };
8
+ exports.diceFlip = diceFlip;
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * @param n
4
+ * @returns true iff random < n
5
+ */
6
+ export declare const probaFlip: (n: number) => boolean;
7
+ //# sourceMappingURL=probaFlip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probaFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/probaFlip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,SAAS,MAAO,MAAM,YAElC,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * @param n
5
+ * @returns true iff random < n
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.probaFlip = void 0;
9
+ const probaFlip = (n) => {
10
+ return Math.random() < n;
11
+ };
12
+ exports.probaFlip = probaFlip;
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * @param arr [T, proba]
4
+ * @returns element T_i with proba p_i
5
+ */
6
+ export declare const probaLawFlip: <T>(arr: [T, number][]) => T;
7
+ //# sourceMappingURL=probaLawFlip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probaLawFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/probaLawFlip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,YAAY,8BAaxB,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * @param arr [T, proba]
5
+ * @returns element T_i with proba p_i
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.probaLawFlip = void 0;
9
+ const probaLawFlip = (arr) => {
10
+ if (Math.abs(arr.reduce((acc, curr) => (acc += curr[1]), 0) - 1) > 0.1)
11
+ throw Error("proba law does not add up t 1");
12
+ const rand = Math.random();
13
+ const sorted = [...arr].sort((a, b) => b[1] - a[1]);
14
+ let probaAcc = 0;
15
+ let i = 0;
16
+ while (i < arr.length - 1) {
17
+ probaAcc += sorted[i][1];
18
+ if (rand < probaAcc)
19
+ return arr[i][0];
20
+ i++;
21
+ }
22
+ return arr[arr.length - 1][0];
23
+ };
24
+ exports.probaLawFlip = probaLawFlip;
@@ -0,0 +1,2 @@
1
+ export declare function random<t>(array: t[]): t;
2
+ //# sourceMappingURL=random.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/random.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAEnC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.random = void 0;
4
+ function random(array) {
5
+ return array[Math.floor(Math.random() * array.length)];
6
+ }
7
+ exports.random = random;
@@ -0,0 +1,2 @@
1
+ export declare const randomEnumValue: (e: any) => any;
2
+ //# sourceMappingURL=randomEnumValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"randomEnumValue.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/randomEnumValue.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,MAAO,GAAG,QAGrC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.randomEnumValue = void 0;
4
+ const randint_1 = require("../../math/utils/random/randint");
5
+ const randomEnumValue = (e) => {
6
+ const randIndex = (0, randint_1.randint)(0, Object.keys(e).length / 2);
7
+ return e[randIndex];
8
+ };
9
+ exports.randomEnumValue = randomEnumValue;
@@ -0,0 +1,2 @@
1
+ export declare function shuffle<T>(array: T[]): T[];
2
+ //# sourceMappingURL=shuffle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffle.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/shuffle.ts"],"names":[],"mappings":"AACA,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAS1C"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shuffle = void 0;
4
+ /* Randomize array in-place using Durstenfeld shuffle algorithm */
5
+ function shuffle(array) {
6
+ const res = [...array];
7
+ for (var i = res.length - 1; i > 0; i--) {
8
+ var j = Math.floor(Math.random() * (i + 1));
9
+ var temp = res[i];
10
+ res[i] = res[j];
11
+ res[j] = temp;
12
+ }
13
+ return res;
14
+ }
15
+ exports.shuffle = shuffle;
@@ -0,0 +1,2 @@
1
+ export declare function arrayEqual<T>(arr1: T[], arr2: T[]): boolean;
2
+ //# sourceMappingURL=arrayEqual.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrayEqual.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/arrayEqual.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAM3D"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.arrayEqual = void 0;
4
+ function arrayEqual(arr1, arr2) {
5
+ if (arr1.length !== arr2.length)
6
+ return false;
7
+ for (let i = 0; i < arr1.length; i++) {
8
+ if (arr1[i] !== arr2[i])
9
+ return false;
10
+ }
11
+ return true;
12
+ }
13
+ exports.arrayEqual = arrayEqual;
@@ -0,0 +1,2 @@
1
+ export declare function arrayHasSameElements<E>(arr1: E[], arr2: E[]): boolean;
2
+ //# sourceMappingURL=arrayHasSameElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrayHasSameElement.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/arrayHasSameElement.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAKrE"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.arrayHasSameElements = void 0;
4
+ function arrayHasSameElements(arr1, arr2) {
5
+ return (arr1.length === arr2.length &&
6
+ arr1.every((element) => arr2.includes(element)));
7
+ }
8
+ exports.arrayHasSameElements = arrayHasSameElements;