coordinates

Crates.iocoordinates
lib.rscoordinates
version
sourcesrc
created_at2022-08-05 07:40:20.954477
updated_at2025-01-10 01:41:53.958933
descriptionSimple, no nonsense, library for using two and three dimensonal coordinates in several systems.
homepage
repositoryhttps://github.com/2sugarcubes/coordinates.rs
max_upload_size
id639196
Cargo.toml error:TOML parse error at line 21, column 1 | 21 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Lucy (2sugarcubes)

documentation

README

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
Commit count: 77

cargo fmt