Jump to content


GMLinear: Easy matrix and vector operations for GMS 1.x

  • Please log in to reply
1 reply to this topic

#1 GameGeisha



  • GMC Member
  • 6565 posts
  • Version:GM:Studio

Posted 21 February 2016 - 06:15 AM

GMLinear 1.0.0
Matrix and vector library for Studio 1.x

Compatible with: Studio 1.xIntroduction
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.

  • 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
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:

Without GMLinear:

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

  • 5
Latest Releases:
  • GMLinear --- Matrix and vector math in one line!
  • GMAssert --- Debug invalid values and write quick unit tests with ease!
  • KameGMS --- Bring up TortoiseSVN and TortoiseGit dialogs from within the GMS IDE!
  • JSOnion v1.1 --- The stink-free way to handle JSON! (even deeply nested ones)

#2 fel666


    GMC Member

  • GMC Member
  • 1883 posts
  • Version:GM:Studio

Posted 26 February 2016 - 11:42 PM

This is bery nice!
The code is bery clean. And covers most of what you would need.
I can see me add this to my projects by default! Great job!
  • 0

This forum is old and archived, Whatever it is i said up above may no longer reflect my opinion.