pub struct Vector3 {
pub x: f64,
pub y: f64,
pub z: f64,
}Fields§
§x: f64§y: f64§z: f64Implementations§
Source§impl Vector3
impl Vector3
pub fn new(x: f64, y: f64, z: f64) -> Vector3
pub fn ihat() -> Vector3
pub fn jhat() -> Vector3
pub fn khat() -> Vector3
pub fn zero() -> Vector3
pub fn dot(&self, rhs: &Vector3) -> f64
pub fn cross(&self, rhs: &Vector3) -> Vector3
pub fn angle_cosine(&self, rhs: &Vector3) -> f64
pub fn normd(&self) -> Vector3
pub fn with_magnitude(&self, magnitude: f64) -> Vector3
Trait Implementations§
impl Copy for Vector3
impl StructuralPartialEq for Vector3
Auto Trait Implementations§
impl Freeze for Vector3
impl RefUnwindSafe for Vector3
impl Send for Vector3
impl Sync for Vector3
impl Unpin for Vector3
impl UnwindSafe for Vector3
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more