Struct orbtk_utils::OnPlanePos
source · [−]pub struct OnPlanePos { /* private fields */ }
Expand description
Describes a position on a plane
Implementations
sourceimpl OnPlanePos
impl OnPlanePos
pub fn new(x: OnLinePos, y: OnLinePos) -> OnPlanePos
pub fn x(&self) -> OnLinePos
pub fn y(&self) -> OnLinePos
pub fn x_mut(&mut self) -> &mut OnLinePos
pub fn y_mut(&mut self) -> &mut OnLinePos
sourcepub fn unit_percent(&self, size: Size) -> Point
pub fn unit_percent(&self, size: Size) -> Point
Returns the position in a range from 0.0 to 1.0
Trait Implementations
sourceimpl Clone for OnPlanePos
impl Clone for OnPlanePos
sourcefn clone(&self) -> OnPlanePos
fn clone(&self) -> OnPlanePos
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OnPlanePos
impl Debug for OnPlanePos
sourceimpl Default for OnPlanePos
impl Default for OnPlanePos
sourceimpl PartialEq<OnPlanePos> for OnPlanePos
impl PartialEq<OnPlanePos> for OnPlanePos
sourcefn eq(&self, other: &OnPlanePos) -> bool
fn eq(&self, other: &OnPlanePos) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &OnPlanePos) -> bool
fn ne(&self, other: &OnPlanePos) -> bool
This method tests for !=
.
sourceimpl PartialOrd<OnPlanePos> for OnPlanePos
impl PartialOrd<OnPlanePos> for OnPlanePos
sourcefn partial_cmp(&self, other: &OnPlanePos) -> Option<Ordering>
fn partial_cmp(&self, other: &OnPlanePos) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 Copy for OnPlanePos
impl StructuralPartialEq for OnPlanePos
Auto Trait Implementations
impl RefUnwindSafe for OnPlanePos
impl Send for OnPlanePos
impl Sync for OnPlanePos
impl Unpin for OnPlanePos
impl UnwindSafe for OnPlanePos
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more