Crates.io | lina |
lib.rs | lina |
version | 0.2.1 |
source | src |
created_at | 2021-10-17 13:10:22.690708 |
updated_at | 2023-07-21 07:38:23.736697 |
description | Linear algebra library with a focus on 3D applications like games (i.e. low-dimensional vectors and matrices) |
homepage | |
repository | https://github.com/LukasKalbertodt/lina/ |
max_upload_size | |
id | 466190 |
size | 222,783 |
lina
: linear algebra library for 3D applicationslina
is a linear algebra library making heavy use of strong typing.
Its focus is on 3D applications like games, i.e. low-dimensional vectors and matrices.
Notable features setting lina
apart from other similar libraries:
.x
, .y
, .z
and .w
.HcPoint
and HcMatrix
).Space
parameter to represent the logical space (e.g. model, world, view, ... space) the vector, point, etc lives in.Point
) and displacements (Vector
).The last three of these illustrate the philosophy of lina
regarding strong typing.
For motivation and examples, please read this document.
In fact, this is all still a bit of an experiment, but so far I am very happy with the results in practice!
However, I'm sure this is not for everyone and many would prefer a different API.
Luckily, there exist many other libraries in the Rust ecosystem.
To be clear: lina
is not better than
cgmath
,
nalgebra
,
glam
,
ultraviolet
vek
, etc.
It is simply different, with an API that better fits my taste – and maybe yours.
Additional Features:
Degrees
and Radians
SphericalPos
and SphericalDir
atan2
, clamp
, lerp
, slerp
, ...assert_approx_eq!
)The only major thing that I'd still like to add in the future is rotors.
lina
offers the standard translation matrices, but rotors can be better for representing and composing rotations.
See the documentation for more information.
lina
is is certainly usable and is quite feature rich.
I actively use it in a game project, which also motivated most API design decisions.
But lina
is not used by many other projects, and there might still be some non-minor API changes.
Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.