From 4ec99fc0221fcbc401e43a435678ddc403cd6f3f Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Wed, 1 Oct 2025 05:50:17 -0400 Subject: [PATCH] fix: typos in code comments (#3544) --- .../function/matrix/ctranspose.test.js | 2 +- types/index.d.ts | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/unit-tests/function/matrix/ctranspose.test.js b/test/unit-tests/function/matrix/ctranspose.test.js index a0aa0b7d1..ebc90db44 100644 --- a/test/unit-tests/function/matrix/ctranspose.test.js +++ b/test/unit-tests/function/matrix/ctranspose.test.js @@ -18,7 +18,7 @@ describe('ctranspose', function () { assert.deepStrictEqual(ctranspose(math.matrix([1, 2, 3]).toArray()), [1, 2, 3]) }) - it('should conjgate a complex vector', function () { + it('should conjugate a complex vector', function () { const a = math.complex(1, 2) const b = math.complex(3, 4) const c = math.complex(5, 6) diff --git a/types/index.d.ts b/types/index.d.ts index 2fe11856e..ee743f9c7 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1093,7 +1093,7 @@ export interface MathJsInstance extends MathJsFactory { * decomposition. * @param order The Symbolic Ordering and Analysis order: 0 - Natural * ordering, no permutation vector q is returned 1 - Matrix must be - * square, symbolic ordering and analisis is performed on M = A + A' 2 - + * square, symbolic ordering and analysis is performed on M = A + A' 2 - * Symbolic ordering and analysis is performed on M = A' * A. Dense * columns from A' are dropped, A recreated from A'. This is appropriate * for LU factorization of non-symmetric matrices. 3 - Symbolic ordering @@ -1329,7 +1329,7 @@ export interface MathJsInstance extends MathJsFactory { * @param args A list with numeric values or an Array or Matrix. Matrix * and Array input is flattened and returns a single number for the * whole matrix. - * @returns Returns the hypothenuse of the input values. + * @returns Returns the hypotenuse of the input values. */ hypot(...args: T[]): T hypot(args: T[]): T @@ -1547,7 +1547,7 @@ export interface MathJsInstance extends MathJsFactory { * strings will be converted to a number. For complex numbers, both real * and complex value are inverted. * @param x Number to be inverted - * @returns Retursn the value with inverted sign + * @returns Returns the value with inverted sign */ unaryMinus(x: T): T @@ -1758,7 +1758,7 @@ export interface MathJsInstance extends MathJsFactory { ************************************************************************/ /** - * Calculates: The eucledian distance between two points in 2 and 3 + * Calculates: The Euclidean distance between two points in 2 and 3 * dimensional spaces. Distance between point and a line in 2 and 3 * dimensional spaces. Pairwise distance between a set of 2D or 3D * points NOTE: When substituting coefficients of a line(a, b and c), @@ -2082,7 +2082,7 @@ export interface MathJsInstance extends MathJsFactory { /** * Calculate the inverse of a square matrix. - * @param x Matrix to be inversed + * @param x Matrix to be inverted * @returns The inverse of x */ inv(x: T): NoLiteralType @@ -2191,7 +2191,7 @@ export interface MathJsInstance extends MathJsFactory { /** * Calculate the Moore–Penrose inverse of a matrix. - * @param x Matrix to be inversed + * @param x Matrix to be inverted * @return The inverse of `x`. */ pinv(x: T): T @@ -2458,7 +2458,7 @@ export interface MathJsInstance extends MathJsFactory { * distributions * @param q First vector * @param p Second vector - * @returns Returns disance between q and p + * @returns Returns distance between q and p */ kldivergence(q: MathCollection, p: MathCollection): number @@ -2475,7 +2475,7 @@ export interface MathJsInstance extends MathJsFactory { * takes one array of integers as an argument. The following condition * must be enforced: every ai <= 0 * @param a Integer number of objects in the subset - * @returns multinomial coefficent + * @returns multinomial coefficient */ multinomial(a: T[]): NoLiteralType @@ -2580,7 +2580,7 @@ export interface MathJsInstance extends MathJsFactory { * Test element wise whether two matrices are equal. The function * accepts both matrices and scalar values. * @param x First matrix to compare - * @param y Second amtrix to compare + * @param y Second matrix to compare * @returns Returns true when the input matrices have the same size and * each of their elements is equal. */ @@ -2622,7 +2622,7 @@ export interface MathJsInstance extends MathJsFactory { * compare values smaller than approximately 2.22e-16. For matrices, the * function is evaluated element wise. * @param x First value to compare - * @param y Second value to vcompare + * @param y Second value to compare * @returns Returns true when x is larger than y, else returns false */ larger(x: MathType | string, y: MathType | string): boolean | MathCollection @@ -2634,7 +2634,7 @@ export interface MathJsInstance extends MathJsFactory { * to compare values smaller than approximately 2.22e-16. For matrices, * the function is evaluated element wise. * @param x First value to compare - * @param y Second value to vcompare + * @param y Second value to compare * @returns Returns true when x is larger than or equal to y, else * returns false */ @@ -2647,7 +2647,7 @@ export interface MathJsInstance extends MathJsFactory { * to compare values smaller than approximately 2.22e-16. For matrices, * the function is evaluated element wise. * @param x First value to compare - * @param y Second value to vcompare + * @param y Second value to compare * @returns Returns true when x is smaller than y, else returns false */ smaller(x: MathType | string, y: MathType | string): boolean | MathCollection @@ -2659,7 +2659,7 @@ export interface MathJsInstance extends MathJsFactory { * used to compare values smaller than approximately 2.22e-16. For * matrices, the function is evaluated element wise. * @param x First value to compare - * @param y Second value to vcompare + * @param y Second value to compare * @returns Returns true when x is smaller than or equal to y, else * returns false */ @@ -2693,7 +2693,7 @@ export interface MathJsInstance extends MathJsFactory { * strictly, thus null is unequal with everything except null, and * undefined is unequal with everything except undefined. * @param x First value to compare - * @param y Second value to vcompare + * @param y Second value to compare * @returns Returns true when the compared values are unequal, else * returns false */