pub struct Vec2f {
pub x: f32,
pub y: f32,
}
Expand description
Vector with two f32 components
Fields§
§x: f32
§y: f32
Implementations§
source§impl Vec2f
impl Vec2f
pub fn cross(self, other: Vec2f) -> f32
pub fn lerp(self, other: Vec2f, t: f32) -> Vec2f
pub fn dot(self, other: Vec2f) -> f32
pub fn vec3f(self) -> Vec3f
pub fn distance_squared(self, other: Vec2f) -> f32
pub fn distance(self, other: Vec2f) -> f32
pub fn magnitude_squared(self) -> f32
pub fn magnitude(self) -> f32
pub fn normalized(self) -> Option<Vec2f>
Trait Implementations§
source§impl PartialEq for Vec2f
impl PartialEq for Vec2f
impl Copy for Vec2f
impl StructuralPartialEq for Vec2f
Auto Trait Implementations§
impl Freeze for Vec2f
impl RefUnwindSafe for Vec2f
impl Send for Vec2f
impl Sync for Vec2f
impl Unpin for Vec2f
impl UnwindSafe for Vec2f
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