pub struct NormalizedPoint2 {
pub x: f32,
pub y: f32,
}Expand description
Data type for normalized point2.
Fields§
§x: f32The x value.
y: f32The y value.
Implementations§
Source§impl NormalizedPoint2
impl NormalizedPoint2
Sourcepub fn to_pixel_point(self, size: Size2u) -> Point2i
pub fn to_pixel_point(self, size: Size2u) -> Point2i
Converts this value to pixel point.
Sourcepub fn to_pixel_point_f32(self, size: Size2u) -> Point2f
pub fn to_pixel_point_f32(self, size: Size2u) -> Point2f
Converts this value to pixel point f32.
Trait Implementations§
Source§impl Clone for NormalizedPoint2
impl Clone for NormalizedPoint2
Source§fn clone(&self) -> NormalizedPoint2
fn clone(&self) -> NormalizedPoint2
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NormalizedPoint2
Source§impl Debug for NormalizedPoint2
impl Debug for NormalizedPoint2
Source§impl<'de> Deserialize<'de> for NormalizedPoint2
impl<'de> Deserialize<'de> for NormalizedPoint2
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for NormalizedPoint2
impl PartialEq for NormalizedPoint2
Source§fn eq(&self, other: &NormalizedPoint2) -> bool
fn eq(&self, other: &NormalizedPoint2) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NormalizedPoint2
impl Serialize for NormalizedPoint2
impl StructuralPartialEq for NormalizedPoint2
Auto Trait Implementations§
impl Freeze for NormalizedPoint2
impl RefUnwindSafe for NormalizedPoint2
impl Send for NormalizedPoint2
impl Sync for NormalizedPoint2
impl Unpin for NormalizedPoint2
impl UnsafeUnpin for NormalizedPoint2
impl UnwindSafe for NormalizedPoint2
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