[][src]Struct thyme::Point

pub struct Point {
    pub x: f32,
    pub y: f32,
}

A two-dimensional point, with x and y coordinates.

Fields

x: f32

The x cartesian coordinate

y: f32

The y cartesian coordinate

Implementations

impl Point[src]

pub fn new(x: f32, y: f32) -> Point[src]

Creates a new point from the specified components.

pub fn round(self) -> Point[src]

Returns a point with both components rounded to the nearest integer

pub fn max(self, other: Point) -> Point[src]

Returns a per-component maximum of this and other

pub fn min(self, other: Point) -> Point[src]

Returns a per-component minimum of this and other

Trait Implementations

impl Add<[f32; 2]> for Point[src]

type Output = Point

The resulting type after applying the + operator.

impl Add<(f32, f32)> for Point[src]

type Output = Point

The resulting type after applying the + operator.

impl Add<Point> for Point[src]

type Output = Point

The resulting type after applying the + operator.

impl Add<Point> for (f32, f32)[src]

type Output = Point

The resulting type after applying the + operator.

impl Add<Point> for [f32; 2][src]

type Output = Point

The resulting type after applying the + operator.

impl Clone for Point[src]

impl Copy for Point[src]

impl Debug for Point[src]

impl Default for Point[src]

impl<'de> Deserialize<'de> for Point[src]

impl Div<Point> for f32[src]

type Output = Point

The resulting type after applying the / operator.

impl Div<f32> for Point[src]

type Output = Point

The resulting type after applying the / operator.

impl From<[f32; 2]> for Point[src]

impl From<(f32, f32)> for Point[src]

impl From<Point> for [f32; 2][src]

impl From<Point> for (f32, f32)[src]

impl Mul<Point> for f32[src]

type Output = Point

The resulting type after applying the * operator.

impl Mul<f32> for Point[src]

type Output = Point

The resulting type after applying the * operator.

impl PartialEq<Point> for Point[src]

impl Serialize for Point[src]

impl StructuralPartialEq for Point[src]

impl Sub<[f32; 2]> for Point[src]

type Output = Point

The resulting type after applying the - operator.

impl Sub<(f32, f32)> for Point[src]

type Output = Point

The resulting type after applying the - operator.

impl Sub<Point> for Point[src]

type Output = Point

The resulting type after applying the - operator.

impl Sub<Point> for (f32, f32)[src]

type Output = Point

The resulting type after applying the - operator.

impl Sub<Point> for [f32; 2][src]

type Output = Point

The resulting type after applying the - operator.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Content for T where
    T: Copy

type Owned = T

A type that holds a sized version of the content.

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Serialize for T where
    T: Serialize + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.