nerdamer-ts
Version:
javascript light-weight symbolic math expression evaluator
51 lines (50 loc) • 1.38 kB
TypeScript
export class Vector {
/**
* Generate a vector from and array
* @param {type} a
* @returns {Vector}
*/
static fromArray(a: any): Vector;
/**
* Convert a Set to a Vector
* @param {Set} set
* @returns {Vector}
*/
static fromSet(set: Set<any>): Vector;
/**
* Generates a pre-filled array
* @param {int} n
* @param {any} val
* @returns {any[]}
*/
static arrayPrefill(n: any, val: any): any[];
constructor(v: any, ...args: any[]);
elements: any;
custom: boolean;
e(i: any): any;
set(i: any, val: any): void;
dimensions(): any;
modulus(): Symbol;
eql(vector: any): boolean;
clone(): Vector;
map(fn: any): Vector;
each(fn: any): void;
toUnitVector(): Vector;
angleFrom(vector: any): Symbol | null;
isParallelTo(vector: any): boolean | null;
isAntiparallelTo(vector: any): boolean | null;
isPerpendicularTo(vector: any): boolean | null;
add(vector: any): Vector | null;
subtract(vector: any): Vector | null;
multiply(k: any): Vector;
x(k: any): Vector;
dot(vector: any): Symbol | null;
cross(vector: any): Vector | null;
max(): number;
magnitude(): Symbol;
indexOf(x: any): number | null;
text(): any;
toString(): any;
latex(option: any): string;
}
import { Symbol } from "./Symbol";