[−][src]Struct orbtk::utils::Point
A Point
is specified by a x coordinate and an y coordinate.
Examples
let point = Point::new(10., 10.); let other_point = Point::new(5., 7.); let result = size - other_point; assert_eq!(result.x(), 5.); assert_eq!(result.y(), 3.);
Implementations
impl Point
[src]
pub fn distance(&self, other: Point) -> f64
[src]
Returns the distance between this Point
and the given Point
.
pub fn x(&self) -> f64
[src]
Gets the x position of the point.
pub fn set_x(&mut self, x: impl Into<f64>)
[src]
Sets the x position of the point.
pub fn y(&self) -> f64
[src]
Gets the y position of the point.
pub fn set_y(&mut self, y: impl Into<f64>)
[src]
Sets the y position of the point.
impl Point
[src]
Trait Implementations
impl Add<Point> for Point
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, rhs: Point) -> Point
[src]
impl Clone for Point
[src]
impl Copy for Point
[src]
impl Debug for Point
[src]
impl Default for Point
[src]
impl From<(f64, f64)> for Point
[src]
impl From<(i32, i32)> for Point
[src]
impl From<f64> for Point
[src]
impl From<i32> for Point
[src]
impl IntoPropertySource<Point> for Entity
[src]
fn into_source(self) -> PropertySource<Point>
[src]
impl IntoPropertySource<Point> for f64
[src]
fn into_source(self) -> PropertySource<Point>
[src]
impl IntoPropertySource<Point> for (i32, i32)
[src]
fn into_source(self) -> PropertySource<Point>
[src]
impl<'_> IntoPropertySource<Point> for (&'_ str, Entity)
[src]
fn into_source(self) -> PropertySource<Point>
[src]
impl IntoPropertySource<Point> for (f64, f64)
[src]
fn into_source(self) -> PropertySource<Point>
[src]
impl IntoPropertySource<Point> for Point
[src]
fn into_source(self) -> PropertySource<Point>
[src]
impl IntoPropertySource<Point> for (String, Entity)
[src]
fn into_source(self) -> PropertySource<Point>
[src]
impl IntoPropertySource<Point> for i32
[src]
fn into_source(self) -> PropertySource<Point>
[src]
impl PartialEq<Point> for Point
[src]
impl Sub<Point> for Point
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,