vecmate 0.2.3

Lightweight, zero-dependency, type-agnostic library for vector math.
Documentation
  • Coverage
  • 96.55%
    28 out of 29 items documented1 out of 11 items with examples
  • Size
  • Source code size: 13.8 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.5 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Ztry8/VecMate
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Ztry8

VecMate

GitHub last commit crates.io docs.rs License

Lightweight, zero-dependency, type-agnostic library for vector math.

let mut position = consts::f32::ZERO;
let target = vec2(10.0, 5.0);
let speed = 2.0;

let direction = (target - position).normalize();
position += direction * speed;

println!("Moving towards {target}");
println!("New position: {position}");

Why?

I didn't find any simple libraries for vector mathematics, so I decided to write my own!
VecMate is focused on minimalism and clarity

Installation

Run in a project root:

cargo add vecmate

Or add it manually to your Cargo.toml:

[dependencies]
vecmate = "*"

Contributing

Any pull-requests and issues are welcome!
Please remember that one of the goals of the library is to be dependency-free,
Therefore, any proposals that contain dependencies will be rejected.
Please adhere to the architecture and style of the project.

TODO

  • More constants
  • More functions
  • 3D vectors
  • 4D vectors