[−][src]Struct iomath::types::basic_types::TVector3
Fields
x: T
y: T
z: T
Implementations
impl<T> TVector3<T> where
T: Zero<T> + Copy,
[src]
T: Zero<T> + Copy,
pub fn empty() -> Self
[src]
Creates TVector3<type> whose x, y and z equal to zero
use iomath::vectors::Vector3; let vector = Vector3::empty(); assert_eq!(vector, Vector3 { x: 0.0, y: 0.0, z: 0.0 });
pub fn new(x: T, y: T, z: T) -> Self
[src]
Creates TVector3<type> with x, y and z
use iomath::vectors::Vector3; let vector = Vector3::new(3.7, -1.3, 0.5); assert_eq!(vector, Vector3 { x: 3.7, y: -1.3, z: 0.5 });
pub fn from_scalar(scalar: T) -> Self
[src]
Creates TVector3<type> whose x, y and z equal to scalar
use iomath::vectors::Vector3; let vector = Vector3::from_scalar(8.2); assert_eq!(vector, Vector3::new(8.2, 8.2, 8.2));
pub fn from_value_vector(value: T, vector: TVector2<T>) -> Self
[src]
Creates TVector3<type> whose x equals to value, y and z equal to TVector2<type>'s x and y
use iomath::vectors::{ Vector3, Vector2 }; let vector = Vector3::from_value_vector(-4.2, Vector2::new(7.3, 2.4)); assert_eq!(vector, Vector3::new(-4.2, 7.3, 2.4));
pub fn from_vector_value(vector: TVector2<T>, value: T) -> Self
[src]
Creates TVector3<type> whose x and y equal to TVector2<type>'s x and y, z equals to value
use iomath::vectors::{ Vector3, Vector2 }; let vector = Vector3::from_vector_value(Vector2::new(7.3, 2.4), -4.2); assert_eq!(vector, Vector3::new(7.3, 2.4, -4.2));
Trait Implementations
impl<T> Add<T> for TVector3<T> where
T: Add<Output = T> + Copy,
[src]
T: Add<Output = T> + Copy,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, scalar: T) -> Self::Output
[src]
impl<T> Add<TVector3<T>> for TVector3<T> where
T: Add<Output = T>,
[src]
T: Add<Output = T>,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self::Output
[src]
impl<T> AddAssign<T> for TVector3<T> where
T: AddAssign + Copy,
[src]
T: AddAssign + Copy,
fn add_assign(&mut self, scalar: T)
[src]
impl<T> AddAssign<TVector3<T>> for TVector3<T> where
T: AddAssign,
[src]
T: AddAssign,
fn add_assign(&mut self, other: Self)
[src]
impl<T> BitAnd<T> for TVector3<T> where
T: BitAnd<Output = T> + Copy,
[src]
T: BitAnd<Output = T> + Copy,
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, scalar: T) -> Self::Output
[src]
impl<T> BitAnd<TVector3<T>> for TVector3<T> where
T: BitAnd<Output = T>,
[src]
T: BitAnd<Output = T>,
type Output = Self
The resulting type after applying the &
operator.
fn bitand(self, rhs: Self) -> Self::Output
[src]
impl<T> BitAndAssign<T> for TVector3<T> where
T: BitAndAssign + Copy,
[src]
T: BitAndAssign + Copy,
fn bitand_assign(&mut self, scalar: T)
[src]
impl<T> BitAndAssign<TVector3<T>> for TVector3<T> where
T: BitAndAssign,
[src]
T: BitAndAssign,
fn bitand_assign(&mut self, rhs: Self)
[src]
impl<T> BitOr<T> for TVector3<T> where
T: BitOr<Output = T> + Copy,
[src]
T: BitOr<Output = T> + Copy,
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, scalar: T) -> Self::Output
[src]
impl<T> BitOr<TVector3<T>> for TVector3<T> where
T: BitOr<Output = T>,
[src]
T: BitOr<Output = T>,
type Output = Self
The resulting type after applying the |
operator.
fn bitor(self, rhs: Self) -> Self::Output
[src]
impl<T> BitOrAssign<T> for TVector3<T> where
T: BitOrAssign + Copy,
[src]
T: BitOrAssign + Copy,
fn bitor_assign(&mut self, scalar: T)
[src]
impl<T> BitOrAssign<TVector3<T>> for TVector3<T> where
T: BitOrAssign,
[src]
T: BitOrAssign,
fn bitor_assign(&mut self, rhs: Self)
[src]
impl<T> BitXor<T> for TVector3<T> where
T: BitXor<Output = T> + Copy,
[src]
T: BitXor<Output = T> + Copy,
type Output = Self
The resulting type after applying the ^
operator.
fn bitxor(self, scalar: T) -> Self::Output
[src]
impl<T> BitXor<TVector3<T>> for TVector3<T> where
T: BitXor<Output = T>,
[src]
T: BitXor<Output = T>,
type Output = Self
The resulting type after applying the ^
operator.
fn bitxor(self, rhs: Self) -> Self::Output
[src]
impl<T> BitXorAssign<T> for TVector3<T> where
T: BitXorAssign + Copy,
[src]
T: BitXorAssign + Copy,
fn bitxor_assign(&mut self, scalar: T)
[src]
impl<T> BitXorAssign<TVector3<T>> for TVector3<T> where
T: BitXorAssign,
[src]
T: BitXorAssign,
fn bitxor_assign(&mut self, rhs: Self)
[src]
impl<T> Clone for TVector3<T> where
T: Copy,
[src]
T: Copy,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
[src]
impl<T> Copy for TVector3<T> where
T: Copy,
[src]
T: Copy,
impl<T> Debug for TVector3<T> where
T: Debug,
[src]
T: Debug,
impl<T> Div<T> for TVector3<T> where
T: Div<Output = T> + Copy,
[src]
T: Div<Output = T> + Copy,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, scalar: T) -> Self::Output
[src]
impl<T> Div<TVector3<T>> for TVector3<T> where
T: Div<Output = T>,
[src]
T: Div<Output = T>,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self::Output
[src]
impl<T> DivAssign<T> for TVector3<T> where
T: DivAssign + Copy,
[src]
T: DivAssign + Copy,
fn div_assign(&mut self, scalar: T)
[src]
impl<T> DivAssign<TVector3<T>> for TVector3<T> where
T: DivAssign,
[src]
T: DivAssign,
fn div_assign(&mut self, other: Self)
[src]
impl<T> From<TQuaternion<T>> for TVector3<T>
[src]
fn from(quat: TQuaternion<T>) -> Self
[src]
impl<T> From<TVector2<T>> for TVector3<T> where
T: Zero<T>,
[src]
T: Zero<T>,
impl<T> From<TVector3<T>> for TVector2<T>
[src]
impl<T> From<TVector3<T>> for TVector4<T> where
T: Zero<T>,
[src]
T: Zero<T>,
impl<T> From<TVector4<T>> for TVector3<T>
[src]
impl<T> Index<usize> for TVector3<T>
[src]
type Output = T
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
impl<T> IndexMut<usize> for TVector3<T>
[src]
impl<T> Mul<T> for TVector3<T> where
T: Mul<Output = T> + Copy,
[src]
T: Mul<Output = T> + Copy,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, scalar: T) -> Self::Output
[src]
impl<T> Mul<TVector3<T>> for TVector3<T> where
T: Mul<Output = T>,
[src]
T: Mul<Output = T>,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self::Output
[src]
impl<T> MulAssign<T> for TVector3<T> where
T: MulAssign + Copy,
[src]
T: MulAssign + Copy,
fn mul_assign(&mut self, scalar: T)
[src]
impl<T> MulAssign<TVector3<T>> for TVector3<T> where
T: MulAssign,
[src]
T: MulAssign,
fn mul_assign(&mut self, other: Self)
[src]
impl<T> Neg for TVector3<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
impl<T> PartialEq<TVector3<T>> for TVector3<T> where
T: PartialEq,
[src]
T: PartialEq,
impl<T> Rem<T> for TVector3<T> where
T: Rem<Output = T> + Copy,
[src]
T: Rem<Output = T> + Copy,
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, scalar: T) -> Self::Output
[src]
impl<T> Rem<TVector3<T>> for TVector3<T> where
T: Rem<Output = T>,
[src]
T: Rem<Output = T>,
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, rhs: Self) -> Self::Output
[src]
impl<T> RemAssign<T> for TVector3<T> where
T: RemAssign + Copy,
[src]
T: RemAssign + Copy,
fn rem_assign(&mut self, scalar: T)
[src]
impl<T> RemAssign<TVector3<T>> for TVector3<T> where
T: RemAssign,
[src]
T: RemAssign,
fn rem_assign(&mut self, rhs: Self)
[src]
impl<T> Shl<T> for TVector3<T> where
T: Shl<Output = T> + Copy,
[src]
T: Shl<Output = T> + Copy,
type Output = Self
The resulting type after applying the <<
operator.
fn shl(self, scalar: T) -> Self::Output
[src]
impl<T> Shl<TVector3<T>> for TVector3<T> where
T: Shl<Output = T>,
[src]
T: Shl<Output = T>,
type Output = Self
The resulting type after applying the <<
operator.
fn shl(self, rhs: Self) -> Self::Output
[src]
impl<T> ShlAssign<T> for TVector3<T> where
T: ShlAssign + Copy,
[src]
T: ShlAssign + Copy,
fn shl_assign(&mut self, scalar: T)
[src]
impl<T> ShlAssign<TVector3<T>> for TVector3<T> where
T: ShlAssign,
[src]
T: ShlAssign,
fn shl_assign(&mut self, rhs: Self)
[src]
impl<T> Shr<T> for TVector3<T> where
T: Shr<Output = T> + Copy,
[src]
T: Shr<Output = T> + Copy,
type Output = Self
The resulting type after applying the >>
operator.
fn shr(self, scalar: T) -> Self::Output
[src]
impl<T> Shr<TVector3<T>> for TVector3<T> where
T: Shr<Output = T>,
[src]
T: Shr<Output = T>,
type Output = Self
The resulting type after applying the >>
operator.
fn shr(self, rhs: Self) -> Self::Output
[src]
impl<T> ShrAssign<T> for TVector3<T> where
T: ShrAssign + Copy,
[src]
T: ShrAssign + Copy,
fn shr_assign(&mut self, scalar: T)
[src]
impl<T> ShrAssign<TVector3<T>> for TVector3<T> where
T: ShrAssign,
[src]
T: ShrAssign,
fn shr_assign(&mut self, rhs: Self)
[src]
impl<T> Sub<T> for TVector3<T> where
T: Sub<Output = T> + Copy,
[src]
T: Sub<Output = T> + Copy,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, scalar: T) -> Self::Output
[src]
impl<T> Sub<TVector3<T>> for TVector3<T> where
T: Sub<Output = T>,
[src]
T: Sub<Output = T>,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self::Output
[src]
impl<T> SubAssign<T> for TVector3<T> where
T: SubAssign + Copy,
[src]
T: SubAssign + Copy,
fn sub_assign(&mut self, scalar: T)
[src]
impl<T> SubAssign<TVector3<T>> for TVector3<T> where
T: SubAssign,
[src]
T: SubAssign,
fn sub_assign(&mut self, other: Self)
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for TVector3<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for TVector3<T> where
T: Send,
T: Send,
impl<T> Sync for TVector3<T> where
T: Sync,
T: Sync,
impl<T> Unpin for TVector3<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for TVector3<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> 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>,