A high performance linear algebra library using native Elm ADT.
The set functions create a new copy of the vector, updating a single field.
Divide the vector by a scalar: v / s
Shorthand for scale (1 / s)
A unit vector with the same direction as the given vector: a / |a|
The normalized direction from b to a: (a - b) / |a - b|
The square of the length of the given vector: |a| * |a|
The square of the distance between two vectors.
Lift a binary function to vectors.
lift2 (+) (Vec 1 1) (Vec 2 2)
--> Vec 3 3 : Vec numberKeep in mind that this comes at a cost of doing a step extra and if you need performance, you might be better off deconstructing and applying the function manually.
Construct a vector from a record.
Two dimensional vector type