pub struct Point {
pub x: f32,
pub y: f32,
}Expand description
A point in logical 2D space.
§Examples
use ailloli_ui_core::Point;
assert_eq!(Point::new(2.0, 3.0), Point { x: 2.0, y: 3.0 });Fields§
§x: f32Horizontal logical coordinate; increasing values point right.
y: f32Vertical logical coordinate; increasing values point down.
Implementations§
Source§impl Point
impl Point
Sourcepub const fn new(x: f32, y: f32) -> Self
pub const fn new(x: f32, y: f32) -> Self
Creates a point at (x, y) without normalizing non-finite values.
§Examples
use ailloli_ui_core::Point;
assert_eq!(Point::new(2.0, 3.0).x, 2.0);Trait Implementations§
impl Copy for Point
impl StructuralPartialEq 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 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