vector2

Crates.iovector2
lib.rsvector2
version0.1.5
sourcesrc
created_at2023-08-23 03:57:33.667275
updated_at2023-08-28 01:59:14.260363
descriptionA simple 2D vector library
homepage
repositoryhttps://github.com/tz629/vector2
max_upload_size
id951544
size10,596
(tz629)

documentation

https://docs.rs/vector2

README

vector2

Vector2 is a simple library for using and creating 2D vectors.

Example

use vector2::Vector2;

// Create a Vector2
let vector2 = Vector2::new(1.0, 0.5);

// (1.0, 0.0)
let other = Vector2::RIGHT;

// Add two Vector2s
let added = vector2 + other;

assert_eq!(added.x, 2.0);
assert_eq!(added.y, 0.5);
Commit count: 19

cargo fmt