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

coordinates

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

5 unstable releases

0.3.1 Sep 24, 2022
0.3.0 Sep 24, 2022
0.2.0 Aug 16, 2022
0.1.1 Aug 5, 2022
0.1.0 Aug 5, 2022

#1774 in Math

Download history 27/week @ 2024-07-29 34/week @ 2024-08-05 17/week @ 2024-08-12 31/week @ 2024-08-19 23/week @ 2024-08-26 23/week @ 2024-09-02 32/week @ 2024-09-09 63/week @ 2024-09-23 65/week @ 2024-10-21 34/week @ 2024-10-28

99 downloads per month

MIT-0 OR 0BSD

51KB
1K SLoC

Coordinates.rs

Getting started

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

coordinates = "0.3.1"

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

coordinates = { version = "0.3.1", 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,
}

Dependencies

~250–465KB