This project provides four sibling packages:
mfiano.lib.math.vector.vector2.f32: single-float 2D vector mathmfiano.lib.math.vector.vector2.f64: double-float 2D vector mathmfiano.lib.math.vector.vector3.f32: single-float 3D vector mathmfiano.lib.math.vector.vector3.f64: double-float 3D vector math
Pick the precision you want and use the package directly.
Example:
(mfiano.lib.math.vector.vector2.f32:new 0f0 1f0)
;; => #(0.0 1.0)
(mfiano.lib.math.vector.vector2.f64:new 0d0 1d0)
;; => #(0.0d0 1.0d0)
(mfiano.lib.math.vector.vector3.f32:new 0f0 1f0 2f0)
;; => #(0.0 1.0 2.0)
(mfiano.lib.math.vector.vector3.f64:new 0d0 1d0 2d0)
;; => #(0.0d0 1.0d0 2.0d0)Note: This project is a work in progress. It is only used by a few in-house projects and does not include, or test, everything I would like yet.
This code is optimized for:
- small, composable math routines with both mutating and consing variants (where applicable)
- predictable names and signatures
- game/graphics ergonomics over math library completeness
Licensed under the MIT License.