#[repr(C)]pub struct Point {
pub x: f32,
pub y: f32,
}Fields§
§x: f32§y: f32Implementations§
Source§impl Point
impl Point
pub const ZERO: Point
pub const ONE: Point
pub const AXIS_X: Point
pub const AXIS_Y: Point
pub const fn new(x: f32, y: f32) -> Self
pub const fn zero() -> Self
pub const fn to_array(self) -> [f32; 2]
pub const fn to_tuple(self) -> (f32, f32)
pub fn abs(self) -> Self
pub fn floor(self) -> Self
pub fn round(self) -> Self
pub fn ceil(self) -> Self
pub fn normalize(self) -> Option<Self>
pub fn normalized(self) -> Self
pub fn lerp(self, other: Self, t: f32) -> Self
pub fn length_squared(self) -> f32
pub fn length(self) -> f32
pub fn area(self) -> f32
pub fn dot(self, to: Self) -> f32
pub fn cross(self, to: Self) -> f32
pub fn distance_squared(self, to: Point) -> f32
pub fn distance(self, to: Point) -> f32
pub fn normal(self) -> Point
pub fn normal_to(self, to: Point) -> Point
pub fn nearly(self, to: Point, epsilon: f32) -> bool
pub fn angle(self) -> f32
Trait Implementations§
Source§impl From<Point> for FixedPoint
impl From<Point> for FixedPoint
Source§impl PartialOrd for Point
impl PartialOrd for Point
impl Copy for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnsafeUnpin for Point
impl UnwindSafe for Point
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