1 stable release
1.0.0 | Apr 21, 2024 |
---|
#1447 in Game dev
25KB
421 lines
Gamevecs
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. .
Examples
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);
}