Struct windows::Foundation::Numerics::Vector2
#[repr(C)]pub struct Vector2 {
pub X: f32,
pub Y: f32,
}
Fields§
§X: f32
§Y: f32
Implementations§
§impl Vector2
impl Vector2
pub fn new(X: f32, Y: f32) -> Self
pub fn zero() -> Self
pub fn one() -> Self
pub fn unit_x() -> Self
pub fn unit_y() -> Self
pub fn dot(&self, rhs: &Self) -> f32
pub fn length_squared(&self) -> f32
pub fn length(&self) -> f32
pub fn distance(&self, value: &Self) -> f32
pub fn distance_squared(&self, value: &Self) -> f32
pub fn normalize(&self) -> Self
Trait Implementations§
impl Copy for Vector2
impl StructuralPartialEq for Vector2
Auto Trait Implementations§
impl Freeze for Vector2
impl RefUnwindSafe for Vector2
impl Send for Vector2
impl Sync for Vector2
impl Unpin for Vector2
impl UnwindSafe for Vector2
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)