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

Linear Equation

Using the linearEquation() function, you can a simple linear equation.

import { linearEquation, Vector3 } from 'mz-math';

const equation: Vector3 = [1, 3, 5]; // x + 3 = 5
const decimalPlaces = 2; // optional

const result: number = linearEquation(equation, decimalPlaces); // 2