Struct makepad_math::math_f32::Vec4
source · pub struct Vec4 {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}
Fields§
§x: f32
§y: f32
§z: f32
§w: f32
Implementations§
source§impl Vec4
impl Vec4
pub fn all(v: f32) -> Self
pub fn to_vec3(&self) -> Vec3
pub fn dot(&self, other: Vec4) -> f32
pub fn from_lerp(a: Vec4, b: Vec4, f: f32) -> Vec4
pub fn is_equal_enough(&self, other: &Vec4, epsilon: f32) -> bool
pub fn from_hsva(hsv: Vec4) -> Vec4
pub fn to_hsva(&self) -> Vec4
pub fn from_u32(val: u32) -> Vec4
pub fn to_u32(&self) -> u32
pub fn xy(&self) -> Vec2
pub fn zw(&self) -> Vec2
Trait Implementations§
source§impl AddAssign<Vec4> for Vec4
impl AddAssign<Vec4> for Vec4
source§fn add_assign(&mut self, rhs: Vec4)
fn add_assign(&mut self, rhs: Vec4)
Performs the
+=
operation. Read moresource§impl AddAssign<f32> for Vec4
impl AddAssign<f32> for Vec4
source§fn add_assign(&mut self, rhs: f32)
fn add_assign(&mut self, rhs: f32)
Performs the
+=
operation. Read moresource§impl DivAssign<Vec4> for Vec4
impl DivAssign<Vec4> for Vec4
source§fn div_assign(&mut self, rhs: Vec4)
fn div_assign(&mut self, rhs: Vec4)
Performs the
/=
operation. Read moresource§impl DivAssign<f32> for Vec4
impl DivAssign<f32> for Vec4
source§fn div_assign(&mut self, rhs: f32)
fn div_assign(&mut self, rhs: f32)
Performs the
/=
operation. Read moresource§impl MulAssign<Vec4> for Vec4
impl MulAssign<Vec4> for Vec4
source§fn mul_assign(&mut self, rhs: Vec4)
fn mul_assign(&mut self, rhs: Vec4)
Performs the
*=
operation. Read moresource§impl MulAssign<f32> for Vec4
impl MulAssign<f32> for Vec4
source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*=
operation. Read moresource§impl PartialEq<Vec4> for Vec4
impl PartialEq<Vec4> for Vec4
source§impl SubAssign<Vec4> for Vec4
impl SubAssign<Vec4> for Vec4
source§fn sub_assign(&mut self, rhs: Vec4)
fn sub_assign(&mut self, rhs: Vec4)
Performs the
-=
operation. Read moresource§impl SubAssign<f32> for Vec4
impl SubAssign<f32> for Vec4
source§fn sub_assign(&mut self, rhs: f32)
fn sub_assign(&mut self, rhs: f32)
Performs the
-=
operation. Read moreimpl Copy for Vec4
impl StructuralPartialEq for Vec4
Auto Trait Implementations§
impl RefUnwindSafe for Vec4
impl Send for Vec4
impl Sync for Vec4
impl Unpin for Vec4
impl UnwindSafe for Vec4
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