gizmo-math 0.1.7

A custom ECS and physics engine aimed for realistic simulations.
Documentation
1
2
3
4
5
6
7
8
9
10
use gizmo_math::{Mat4, Vec4};

fn main() {
    let proj = Mat4::perspective_rh(std::f32::consts::FRAC_PI_2, 1.0, 0.1, 100.0);
    let near_pt = proj * Vec4::new(0.0, 0.0, -0.1, 1.0);
    let far_pt = proj * Vec4::new(0.0, 0.0, -100.0, 1.0);
    
    println!("Near Z: {}", near_pt.z / near_pt.w);
    println!("Far Z: {}", far_pt.z / far_pt.w);
}