Struct makepad_widgets::makepad_vector::geometry::Point
pub struct Point {
pub x: f64,
pub y: f64,
}Expand description
A point in 2-dimensional Euclidian space.
A point represents a position, whereas a vector represents a displacement. That is, the result of subtracting two points is a vector. Moreover, the result of adding/subtracting a vector to/from a point is another point. However, adding two points is not defined. Similarly, whereas a point can be scaled, rotated, and translated, a vector can only be scaled and rotated.
Fields§
§x: f64§y: f64Implementations§
Trait Implementations§
§impl AddAssign<Vector> for Point
impl AddAssign<Vector> for Point
§fn add_assign(&mut self, vector: Vector)
fn add_assign(&mut self, vector: Vector)
Performs the
+= operation. Read more§impl PartialOrd<Point> for Point
impl PartialOrd<Point> for Point
§fn partial_cmp(&self, other: &Point) -> Option<Ordering>
fn partial_cmp(&self, other: &Point) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more§impl SubAssign<Vector> for Point
impl SubAssign<Vector> for Point
§fn sub_assign(&mut self, vector: Vector)
fn sub_assign(&mut self, vector: Vector)
Performs the
-= operation. Read more§impl Transform for Point
impl Transform for Point
fn transform<T>(self, t: &T) -> Pointwhere T: Transformation,
fn transform_mut<T>(&mut self, t: &T)where T: Transformation,
impl Copy for Point
impl StructuralPartialEq for Point
Auto Trait Implementations§
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