Main
Vectors
Matrix
Matrix Manipulation
Transformation Matrices
Angles
Random
Bezier Curve
Equations
Path Movement
Color
Linear Interpolation
Derivatives
Collision Detection
Animation
Circle And Ellipse
Sequence
Combinatorics
Other

Vectors

There are the following types of vectors: Vector2 for a 2D vector, Vector3 for a 3D vector, and Vector for the general case.

import { Vector2, Vector3, Vector4, Vector } from 'mz-math';

const v2: Vector2 = [1, 2];
const v3: Vector3 = [1, 2, 3];
const v4: Vector4 = [1, 2, 3, 4];

const v5: Vector = [1, 2, 3, 4, 5];
const v6: Vector = [1, 2, 3, 4, 5, 6];