L-Maths
Short 2D Maths library. Currently implements Vector2 (64-bit floats) and Point2 (integer), with their classic functions such as length(), normalize(), dot() etc...
Nothing fancy, just a good base for my projects.
Planning to implement other useful structs, like Matrices.
Examples :
Creating a Vector2 :
let v1 = new; //
// or using constants
let v2 = ZERO; // (0.0, 0.0)
Same process for Point2 :
let p1 = new; //
// or using constants
let p2 = X_UNIT; // (1, 0)
Some demo for the functions :
let v3 = v1.normalized; // won't modify v1
v1.normalize // will modify v1
let dp = v1.dot;
// or
let dp = dot;