[−][src]Struct pixel_canvas::vector::Vec3
A 3-dimensional vector.
Fields
x: f32y: f32z: f32Methods
impl Vec3[src]
pub fn xyz(x: f32, y: f32, z: f32) -> Self[src]
Construct a vector out of its components.
pub fn normal(self) -> Self[src]
Normalizes the vector (scales its length to 1).
pub fn dot(self, rhs: Vec3) -> f32[src]
Computes the dot product between two vectors.
pub fn cross(self, rhs: Vec3) -> Vec3[src]
Computes the cross product between two vectors.
pub fn len(&self) -> f32[src]
The length of a vector.
pub fn len2(&self) -> f32[src]
The squared length of a vector.
Trait Implementations
impl Clone for Vec3[src]
impl Copy for Vec3[src]
impl Add<Vec3> for Vec3[src]
type Output = Vec3
The resulting type after applying the + operator.
fn add(self, rhs: Vec3) -> Self[src]
impl Sub<Vec3> for Vec3[src]
type Output = Vec3
The resulting type after applying the - operator.
fn sub(self, rhs: Vec3) -> Self[src]
impl Mul<f32> for Vec3[src]
type Output = Vec3
The resulting type after applying the * operator.
fn mul(self, rhs: f32) -> Self[src]
impl Div<f32> for Vec3[src]
type Output = Vec3
The resulting type after applying the / operator.
fn div(self, rhs: f32) -> Self[src]
impl Debug for Vec3[src]
Auto Trait Implementations
impl Send for Vec3
impl Unpin for Vec3
impl Sync for Vec3
impl UnwindSafe for Vec3
impl RefUnwindSafe for Vec3
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Content for T where
T: Copy, [src]
T: Copy,
type Owned = T
A type that holds a sized version of the content.
fn read<F, E>(size: usize, f: F) -> Result<T, E> where
F: FnOnce(&mut T) -> Result<(), E>, [src]
F: FnOnce(&mut T) -> Result<(), E>,