pub fn change_dir(&mut self, theta_diff: f32, phi_diff: f32) {
        if self.theta < 0.1 {
            if theta_diff > 0.0 {
                // all the way UP, theta will not go any lower
                self.theta += theta_diff;
            }
        } else if self.theta > consts::PI - 0.1 {
            if theta_diff < 0.0 {
                // all the way DOWN, theta will not go any higher
                self.theta += theta_diff;
            }
        } else {
            self.theta += theta_diff;
        }
        self.phi += phi_diff;
    }
/// Changes `theta` and `phi` to essentially change the direction the
/// camera looks
Changes `theta` and `phi` to essentially change the direction the
camera looks
Changes ` theta ` and ` phi ` to essentially change the direction the camera looks
pub fn change_dir(&mut self, theta_diff: f32, phi_diff: f32) {
        if self.theta < 0.1 {
            if theta_diff > 0.0 {
                // all the way UP, theta will not go any lower
                self.theta += theta_diff;
            }
        } else if self.theta > consts::PI - 0.1 {
            if theta_diff < 0.0 {
                // all the way DOWN, theta will not go any higher
                self.theta += theta_diff;
            }
        } else {
            self.theta += theta_diff;
        }
        self.phi += phi_diff;
    }
pub fn change_dir ( & mut self , theta_diff : f32 , phi_diff : f32 ) { if self . theta < 0.1 { if theta_diff > 0.0 { // all the way UP, theta will not go any lower self . theta += theta_diff ; } } else if self . theta > consts :: PI - 0.1 { if theta_diff < 0.0 { // all the way DOWN, theta will not go any higher self . theta += theta_diff ; } } else { self . theta += theta_diff ; } self . phi += phi_diff ; }
Changes `theta` and `phi` to essentially change the direction the
camera looks
Changes ` theta ` and ` phi ` to essentially change the direction the camera looks
&mut self
theta_diff
f32
phi_diff
f32