coordinates

Crates.iocoordinates
lib.rscoordinates
version0.3.0
sourcesrc
created_at2022-08-05 07:40:20.954477
updated_at2022-09-24 07:48:43.257981
descriptionSimple, no nonsense, library for using two and three dimensonal coordinates in several systems.
homepage
repositoryhttps://github.com/luke-magnusson/coordinates.rs
max_upload_size
id639196
size50,594
(luke-magnusson)

documentation

README

Coordinates.rs

Getting started

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

coordinates = "0.3.0"

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

coordinates = { version = "0.3.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,
}
Commit count: 53

cargo fmt