| Crates.io | gamevecs |
| lib.rs | gamevecs |
| version | 1.0.0 |
| created_at | 2024-04-21 13:53:13.008694+00 |
| updated_at | 2024-04-21 13:53:13.008694+00 |
| description | A library that provides 2d and 3d vectors specifically for game developement |
| homepage | |
| repository | https://github.com/nobschulth/gamevecs |
| max_upload_size | |
| id | 1215407 |
| size | 26,085 |
Gamevecs is a library that provides 2d and 3d vectors for game developement in rust. The vectors have common functionality like cross/dot product, lerping, etc. .
use gamevecs::Vec2;
fn main() {
//create 2 2D vectors
let vec1 = Vec2::new(0.0, 10.0);
let vec2 = Vec2::new(10.0, 0.0);
//add them together
let result = vec1 + vec2;
//print the result (10.0, 10.0)
println!(result);
}