| Crates.io | coordinates |
| lib.rs | coordinates |
| version | 0.4.0 |
| created_at | 2022-08-05 07:40:20.954477+00 |
| updated_at | 2025-01-10 01:41:53.958933+00 |
| description | Simple, no nonsense, library for using two and three dimensonal coordinates in several systems. |
| homepage | |
| repository | https://github.com/2sugarcubes/coordinates.rs |
| max_upload_size | |
| id | 639196 |
| size | 74,566 |
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,
}