pub fn vec3_coordinate_system(v1: &Vector3f, v2: &mut Vector3f, v3: &mut Vector3f) {
    if v1.x.abs() > v1.y.abs() {
        *v2 = Vector3f {
            x: -v1.z,
            y: 0.0 as Float,
            z: v1.x,
        } / (v1.x * v1.x + v1.z * v1.z).sqrt();
    } else {
        *v2 = Vector3f {
            x: 0.0 as Float,
            y: v1.z,
            z: -v1.y,
        } / (v1.y * v1.y + v1.z * v1.z).sqrt();
    }
    *v3 = vec3_cross_vec3(v1, &*v2);
}
/// Construct a local coordinate system given only a single 3D vector.
Construct a local coordinate system given only a single 3D vector.
Construct a local coordinate system given only a single 3D vector .
pub fn vec3_coordinate_system(v1: &Vector3f, v2: &mut Vector3f, v3: &mut Vector3f) {
    if v1.x.abs() > v1.y.abs() {
        *v2 = Vector3f {
            x: -v1.z,
            y: 0.0 as Float,
            z: v1.x,
        } / (v1.x * v1.x + v1.z * v1.z).sqrt();
    } else {
        *v2 = Vector3f {
            x: 0.0 as Float,
            y: v1.z,
            z: -v1.y,
        } / (v1.y * v1.y + v1.z * v1.z).sqrt();
    }
    *v3 = vec3_cross_vec3(v1, &*v2);
}
pub fn vec3_coordinate_system ( v1 : & Vector3f , v2 : & mut Vector3f , v3 : & mut Vector3f ) { if v1 . x . abs ( ) > v1 . y . abs ( ) { * v2 = Vector3f { x : - v1 . z , y : 0.0 as Float , z : v1 . x , } / ( v1 . x * v1 . x + v1 . z * v1 . z ) . sqrt ( ) ; } else { * v2 = Vector3f { x : 0.0 as Float , y : v1 . z , z : - v1 . y , } / ( v1 . y * v1 . y + v1 . z * v1 . z ) . sqrt ( ) ; } * v3 = vec3_cross_vec3 ( v1 , & * v2 ) ; }
Construct a local coordinate system given only a single 3D vector.
Construct a local coordinate system given only a single 3D vector .
v1
&Vector3f
v2
&mut Vector3f
v3
&mut Vector3f