Crates.io | melius-vectors |
lib.rs | melius-vectors |
version | 0.1.2 |
source | src |
created_at | 2021-10-05 21:16:29.444321 |
updated_at | 2022-03-31 15:42:35.985183 |
description | Simple 2-4 dimensional vectors that can be easily created and manipulated. |
homepage | https://github.com/PutterBeanut/melius-vectors |
repository | https://github.com/PutterBeanut/melius-vectors |
max_upload_size | |
id | 460885 |
size | 27,328 |
Simple 2-4 dimensional vectors that can be easily created and manipulated.
Under your Cargo.toml's [Dependencies]
, add the following dependency:
melius-vectors = { git = "https://github.com/PutterBeanut/melius-vectors/" }
use melius_vectors::vector2::Vector2;
let mut my_vector: Vector2<f32> = Vector2::empty();
my_vector += Vector2::new(20, 10);
my_vector /= Vector2::new(4, 2);
println!("{}", my_vector); // Prints "{5.0, 5.0}"