{"repo":"polymonster/maths-rs","free":true,"listed":false,"github":"https://github.com/polymonster/maths-rs","clone":"git clone https://github.com/polymonster/maths-rs.git","description":"Linear algebra library for graphics and gamedev.","language":"Rust","stars":59,"topics":["gamedev","math","linear-algebra","matrix","quaternion","swizzling","vector"],"license":"MIT","category":"game-templates","readme_excerpt":"Maths Maths is a linear algebra library which aims to be ergonmic and fun to use for gamedev and graphics. If you like writing shaders you should feel right at home. In addition to the usual implementation of vectors, matrices and quaternions it includes a comprehensive collection of utility functions, vector swizzling, intersection tests, point tests, distance functions, trig functions, graphs and signal processing functions. Most features of the crate are enabled by default, you can choose to opt out if you wish. serde and hash support is optional and disabled by default they can be enabled with: Most of this code was ported from my C++ maths library, there is a live WebGL demo which showcases a lot of the features in an interactive way and was used to generate test data and verify the functions work correctly. Vector This is a narrow vector library with Vec2 , Vec3 and Vec4 column-vector implementations. Matrix Row-major matrices with Mat2 , Mat3 , Mat34 and Mat4 implementations. Quaternion Generic floating-point quaternion. Generic Functions You can use generic functions on different sized vectors or scalars: min, max, clamp, step, signum, copysign, abs, deg to rad, rad to deg, floor, ceil, round, approx, sqrt, powi, powf, sqrt, frac, trunc, modf, rsqrt, recip lerp, nlerp, slerp, smoothstep, dot, perp, cross, mag, mag2, length, distance, dist, dist2, normalize, chebyshev normalize Trigonometry and Logarithmic Functions These functions are availble for all floating point s","default_branch":null,"files":null,"tree":[],"storefront":"/r/polymonster","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/polymonster/maths-rs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}