#[repr(C)]pub struct Vector4 {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}Fields§
§x: f32§y: f32§z: f32§w: f32Implementations§
Source§impl Vector4
impl Vector4
Sourcepub fn add_value(self, add: f32) -> Self
pub fn add_value(self, add: f32) -> Self
Add scalar to all components. (raymath Vector4AddValue)
Sourcepub fn sub_value(self, sub: f32) -> Self
pub fn sub_value(self, sub: f32) -> Self
Subtract scalar from all components. (raymath Vector4SubtractValue)
Sourcepub fn length_sqr(self) -> f32
pub fn length_sqr(self) -> f32
Squared vector length. (raymath Vector4LengthSqr)
Sourcepub fn distance(self, other: Vector4) -> f32
pub fn distance(self, other: Vector4) -> f32
Distance between two vectors. (raymath Vector4Distance)
Sourcepub fn distance_sqr(self, other: Vector4) -> f32
pub fn distance_sqr(self, other: Vector4) -> f32
Squared distance between two vectors. (raymath Vector4DistanceSqr)
Sourcepub fn multiply(self, other: Vector4) -> Self
pub fn multiply(self, other: Vector4) -> Self
Component-wise multiply. (raymath Vector4Multiply)
Sourcepub fn lerp(self, other: Vector4, amount: f32) -> Self
pub fn lerp(self, other: Vector4, amount: f32) -> Self
Linear interpolation. (raymath Vector4Lerp)
Sourcepub fn move_towards(self, target: Vector4, max_distance: f32) -> Self
pub fn move_towards(self, target: Vector4, max_distance: f32) -> Self
Move towards target by at most maxDistance. (raymath Vector4MoveTowards)
Trait Implementations§
Source§impl AddAssign for Vector4
impl AddAssign for Vector4
Source§fn add_assign(&mut self, rhs: Vector4)
fn add_assign(&mut self, rhs: Vector4)
Performs the
+= operation. Read moreimpl Copy for Vector4
Source§impl From<Quaternion> for Vector4
impl From<Quaternion> for Vector4
Source§fn from(q: Quaternion) -> Self
fn from(q: Quaternion) -> Self
Converts to this type from the input type.
Source§impl From<Vector4> for Quaternion
impl From<Vector4> for Quaternion
Source§impl MulAssign<f32> for Vector4
impl MulAssign<f32> for Vector4
Source§fn mul_assign(&mut self, rhs: f32)
fn mul_assign(&mut self, rhs: f32)
Performs the
*= operation. Read moreimpl StructuralPartialEq for Vector4
Auto Trait Implementations§
impl Freeze for Vector4
impl RefUnwindSafe for Vector4
impl Send for Vector4
impl Sync for Vector4
impl Unpin for Vector4
impl UnsafeUnpin for Vector4
impl UnwindSafe for Vector4
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