Skip to content

Adds support for several standard coordinate systems under ISO 80000-2.

License

Notifications You must be signed in to change notification settings

2sugarcubes/coordinates.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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,
}

About

Adds support for several standard coordinate systems under ISO 80000-2.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages