Install Asset
Install via Godot
To maintain one source of truth, Godot Asset Library is just a mirror of the old asset library so you can download directly on Godot via the integrated asset library browser

Quick Information

A small library to do some complex linear algebra (matrix and vector operations) in GDScript. Includes QR decomposition and a basic diagonalization algorithm for symmetric matrices. Due to GDScript's speed, it's oriented towards performance, not ease of use, so the interface may not be intuitive!
godot-linalg
Linear Algebra library in GDScript for Godot Engine
All methods are optimised for maximum speed. They take arrays and assume the right dimension for them. If the inputs aren't right they'll crash. Third input is used for the answer, preallocated. There are no conditional branchings. Just use the method appropriate to the situation. The names are coded to reflect that. s = scalar, v = vector and m = matrix. So for example
dot_vm(v, M)
is a dot product between vector and matrix (in that order). Wherever the in_place
argument is provided, it is possible to perform the operation on the object itself instead of instantiating a new one (this too optimises performance). So for example
transpose(M, true)
will turn M into its own transpose by reference, whereas
MT = transpose(M)
will leave M unaltered.
Most method names are self-explanatory. The less intuitive are:
householder(v)
: computes the Householder matrix of a vector;qr(M)
: computes the QR decomposition of a square matrix;eigs_powerit
: computes the eigenvalues and eigenvectors of a square symmetric matrix using the power iteration algorithm combined with a Hotelling deflation (check out this book for more details).
A small library to do some complex linear algebra (matrix and vector operations) in GDScript. Includes QR decomposition and a basic diagonalization algorithm for symmetric matrices. Due to GDScript's speed, it's oriented towards performance, not ease of use, so the interface may not be intuitive!
Reviews
Quick Information

A small library to do some complex linear algebra (matrix and vector operations) in GDScript. Includes QR decomposition and a basic diagonalization algorithm for symmetric matrices. Due to GDScript's speed, it's oriented towards performance, not ease of use, so the interface may not be intuitive!