Skip to main content

Vec4h

Struct Vec4h 

Source
#[repr(C)]
pub struct Vec4h { pub x: f16, pub y: f16, pub z: f16, pub w: f16, }
Expand description

4-component half-precision float vector (GfVec4h).

Fields§

§x: f16§y: f16§z: f16§w: f16

Implementations§

Source§

impl Vec4h

Source

pub fn lerp(self, other: Self, t: f32) -> Self

Trait Implementations§

Source§

impl Add for Vec4h

Source§

type Output = Vec4h

The resulting type after applying the + operator.
Source§

fn add(self, __rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign for Vec4h

Source§

fn add_assign(&mut self, __rhs: Self)

Performs the += operation. Read more
Source§

impl Clone for Vec4h

Source§

fn clone(&self) -> Vec4h

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Vec4h

Source§

impl Debug for Vec4h

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Vec4h

Source§

fn default() -> Vec4h

Returns the “default value” for a type. Read more
Source§

impl From<Vec4h> for [f16; 4]

Source§

fn from(v: Vec4h) -> Self

Converts to this type from the input type.
Source§

impl From<Vec4h> for Value

Source§

fn from(v: Vec4h) -> Self

Converts to this type from the input type.
Source§

impl From<[f16; 4]> for Vec4h

Source§

fn from([x, y, z, w]: [f16; 4]) -> Self

Converts to this type from the input type.
Source§

impl Index<usize> for Vec4h

Source§

type Output = f16

The returned type after indexing.
Source§

fn index(&self, i: usize) -> &f16

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Vec4h

Source§

fn index_mut(&mut self, i: usize) -> &mut f16

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<__derive_more_Rhs> Mul<__derive_more_Rhs> for Vec4h
where f16: Mul<__derive_more_Rhs, Output = f16>, __derive_more_Rhs: Copy,

Source§

type Output = Vec4h

The resulting type after applying the * operator.
Source§

fn mul(self, __rhs: __derive_more_Rhs) -> Self::Output

Performs the * operation. Read more
Source§

impl<__derive_more_Rhs> MulAssign<__derive_more_Rhs> for Vec4h
where f16: MulAssign<__derive_more_Rhs>, __derive_more_Rhs: Copy,

Source§

fn mul_assign(&mut self, __rhs: __derive_more_Rhs)

Performs the *= operation. Read more
Source§

impl Neg for Vec4h

Source§

type Output = Vec4h

The resulting type after applying the - operator.
Source§

fn neg(self) -> Vec4h

Performs the unary - operation. Read more
Source§

impl PartialEq for Vec4h

Source§

fn eq(&self, other: &Vec4h) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Pod for Vec4h

Source§

impl StructuralPartialEq for Vec4h

Source§

impl Sub for Vec4h

Source§

type Output = Vec4h

The resulting type after applying the - operator.
Source§

fn sub(self, __rhs: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign for Vec4h

Source§

fn sub_assign(&mut self, __rhs: Self)

Performs the -= operation. Read more
Source§

impl Sum for Vec4h

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TryFrom<Value> for Vec4h

Source§

type Error = ValueConversionError

The type returned in the event of a conversion error.
Source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Zeroable for Vec4h

Source§

fn zeroed() -> Self

Auto Trait Implementations§

§

impl Freeze for Vec4h

§

impl RefUnwindSafe for Vec4h

§

impl Send for Vec4h

§

impl Sync for Vec4h

§

impl Unpin for Vec4h

§

impl UnsafeUnpin for Vec4h

§

impl UnwindSafe for Vec4h

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
Source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> NoUninit for T
where T: Pod,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.