[][src]Struct linmath::Vector3

#[repr(C)]
pub struct Vector3<T: Float> { pub x: T, pub y: T, pub z: T, }

Fields

x: Ty: Tz: T

Methods

impl<T: Float> Vector3<T>[src]

pub fn new(x: T, y: T, z: T) -> Vector3<T>[src]

pub fn dot(a: &Vector3<T>, b: &Vector3<T>) -> T[src]

pub fn length(v: &Vector3<T>) -> T[src]

pub fn normalize(v: &Vector3<T>) -> Vector3<T>[src]

impl<T: Float> Vector3<T>[src]

pub fn cross(a: &Vector3<T>, b: &Vector3<T>) -> Vector3<T>[src]

Trait Implementations

impl<T: Copy + Float> Copy for Vector3<T>[src]

impl<T: PartialEq + Float> PartialEq<Vector3<T>> for Vector3<T>[src]

impl<T: Clone + Float> Clone for Vector3<T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Debug + Float> Debug for Vector3<T>[src]

impl<T: Float> Add<Vector3<T>> for Vector3<T>[src]

type Output = Vector3<T>

The resulting type after applying the + operator.

impl<T: Float> Sub<Vector3<T>> for Vector3<T>[src]

type Output = Vector3<T>

The resulting type after applying the - operator.

impl<T: Float> Mul<Vector3<T>> for Matrix3<T>[src]

type Output = Vector3<T>

The resulting type after applying the * operator.

impl<T: Float> Mul<T> for Vector3<T>[src]

type Output = Vector3<T>

The resulting type after applying the * operator.

impl<T: Float> AddAssign<Vector3<T>> for Vector3<T>[src]

impl<T: Float> SubAssign<Vector3<T>> for Vector3<T>[src]

impl<T: Float> MulAssign<T> for Vector3<T>[src]

impl<T: AbsDiffEq> AbsDiffEq<Vector3<T>> for Vector3<T> where
    T::Epsilon: Copy,
    T: Float
[src]

type Epsilon = T::Epsilon

Used for specifying relative comparisons.

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool[src]

The inverse of ApproxEq::abs_diff_eq.

impl<T: RelativeEq> RelativeEq<Vector3<T>> for Vector3<T> where
    T::Epsilon: Copy,
    T: Float
[src]

fn relative_ne(
    &self,
    other: &Rhs,
    epsilon: Self::Epsilon,
    max_relative: Self::Epsilon
) -> bool
[src]

The inverse of ApproxEq::relative_eq.

impl<T: UlpsEq> UlpsEq<Vector3<T>> for Vector3<T> where
    T::Epsilon: Copy,
    T: Float
[src]

fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool[src]

The inverse of ApproxEq::ulps_eq.

Auto Trait Implementations

impl<T> Send for Vector3<T> where
    T: Send

impl<T> Sync for Vector3<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]