Skip to content

rotate method is missing from index.d.ts #2385

@MattBroe

Description

@MattBroe

My code (relevant section is rotateXY() method):

`

import math from "mathjs"

export abstract class GeometryUtils {

public static getDirection(vector: math.MathArray): math.MathArray {
    let norm = math.norm(vector);
    if (norm === 0) {
        return vector;
    }

    return math.divide(vector, norm) as math.MathArray;
}

public static rotateXY(vector: math.MathArray): math.MathArray {
    return math.rotate(vector, [0, 0, 1]);
}

}

`

My tsc error:

`

tsc
ts/geometry_utils.ts:15:21 - error TS2339: Property 'rotate' does not exist on type 'MathJsStatic'.

15 return math.rotate(vector, [0, 0, 1]);
~~~~~~

Found 1 error.

`

Looking at index.d.ts in the repo confirms. mathjs version is 10.0.2. Has this been deprecated?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions