UNPKG

constraint-solver-js

Version:

2D rigid body constraint solver written in typescript.

26 lines (25 loc) 611 B
import { Matrix } from "mathjs"; /** * Represents a solution */ export declare class SolverSolution { private x; private _solved; private msg; constructor(x: Matrix, solved: boolean, msg: string); /** * Get solution's X Vector. */ getX(): Matrix; /** * @returns boolean indicating if the solver found a solution */ solved(): boolean; /** * @returns solver's message. */ message(): string; static success(x: Matrix): SolverSolution; static timeOut(x: Matrix): SolverSolution; static maxIterReached(x: Matrix): SolverSolution; }