#three #systems #coordinate #graphics #magnitude #dimensional #vector2

coordinates

Simple, no nonsense, library for using two and three dimensonal coordinates in several systems

6 releases (3 breaking)

0.4.0 Jan 10, 2025
0.3.1 Sep 24, 2022
0.2.0 Aug 16, 2022
0.1.1 Aug 5, 2022

#541 in Math

Download history 78/week @ 2024-10-26 4/week @ 2024-11-02 33/week @ 2024-12-28 189/week @ 2025-01-04 118/week @ 2025-01-11 40/week @ 2025-01-18 340/week @ 2025-01-25 285/week @ 2025-02-01 108/week @ 2025-02-08

779 downloads per month
Used in 2 crates (via astrograph)

MIT-0 OR 0BSD

54KB
1.5K SLoC

Coordinates.rs

Getting started

Add the following to your cargo.toml under [dependencies]

coordinates = "0.4.0"

If you want additional features — like serializing and deserializing — your [dependencies] line will look more like this

coordinates = { version = "0.4.0", features = ["serde"] }

In a file import the coordinate system you want, or all of them through coordinates::prelude::*

use coordinates::two_dimensional::Vector2;

If you want extra traits, such as magnitude or dot products you will also need to include the following

use coordinates::traits::*;

And finally initialize a variable

let var = Vector2 {
  x: 0.0,
  y: 1.0,
}

Acknowledgements

  • rsekman, for contributing multiple PRs to the repo, and helping me refactor and track down a bug for version 0.4.0

Dependencies

~245–460KB