**GMLinear 1.0.0**

**Matrix and vector library for Studio 1.x**

**Download**

Compatible with: Studio 1.x

**Introduction**

GMLinear is an implementation of matrix and vector operations in pure GML. You can use it to simplify many common calculations in 2D and 3D geometry and implement algorithms/formulas involving linear algebra.

**Features**

- Easy to use, intuitive constructors for building vectors and matrices quickly
- Vector operations: Addition, subtraction, dot product, cross product, scalar-vector product, norms, distances, unit vectors, linear interpolation, projection/rejection, coordinate system conversions
- Matrix operations: Addition, subtraction, scalar-matrix product, matrix-matrix product, matrix-vector product, transpose, inverse
- Hard-coded optimized functions available for 2D, 3D and 4D vectors and 2x2, 3x3 and 4x4 matrices
- All functions are fully independent of each other --- keep only the ones you use

**Example**

Find the intersection point between the plane containing the point (0, 0, 1) with a normal of (1, 0, 0), and the line containing the point (4, 9, -4) and pointing in the direction (-1, 3, 0.5). (see: Line-plane intersection)

With GMLinear:

Spoiler

Without GMLinear:

Spoiler

**Edited by GameGeisha, 21 February 2016 - 06:21 AM.**