[−][src]Struct thyme::Point
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.
fn add(self, other: [f32; 2]) -> Point
[src]
impl Add<(f32, f32)> for Point
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, other: (f32, f32)) -> Point
[src]
impl Add<Point> for Point
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, other: Point) -> Point
[src]
impl Add<Point> for (f32, f32)
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, other: Point) -> Point
[src]
impl Add<Point> for [f32; 2]
[src]
type Output = Point
The resulting type after applying the +
operator.
fn add(self, other: Point) -> Point
[src]
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]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Div<Point> for f32
[src]
type Output = Point
The resulting type after applying the /
operator.
fn div(self, val: Point) -> Point
[src]
impl Div<f32> for Point
[src]
type Output = Point
The resulting type after applying the /
operator.
fn div(self, val: f32) -> Point
[src]
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.
fn mul(self, val: Point) -> Point
[src]
impl Mul<f32> for Point
[src]
type Output = Point
The resulting type after applying the *
operator.
fn mul(self, val: f32) -> Point
[src]
impl PartialEq<Point> for Point
[src]
impl Serialize for Point
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Point
[src]
impl Sub<[f32; 2]> for Point
[src]
type Output = Point
The resulting type after applying the -
operator.
fn sub(self, other: [f32; 2]) -> Point
[src]
impl Sub<(f32, f32)> for Point
[src]
type Output = Point
The resulting type after applying the -
operator.
fn sub(self, other: (f32, f32)) -> Point
[src]
impl Sub<Point> for Point
[src]
type Output = Point
The resulting type after applying the -
operator.
fn sub(self, other: Point) -> Point
[src]
impl Sub<Point> for (f32, f32)
[src]
type Output = Point
The resulting type after applying the -
operator.
fn sub(self, other: Point) -> Point
[src]
impl Sub<Point> for [f32; 2]
[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<T> Content for T where
T: Copy,
T: Copy,
type Owned = T
A type that holds a sized version of the content.
fn read<F, E>(size: usize, f: F) -> Result<T, E> where
F: FnOnce(&mut T) -> Result<(), E>,
F: FnOnce(&mut T) -> Result<(), E>,
fn get_elements_size() -> usize
fn to_void_ptr(&self) -> *const ()
fn ref_from_ptr(ptr: *mut (), size: usize) -> Option<*mut T>
fn is_size_suitable(size: usize) -> bool
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Serialize for T where
T: Serialize + ?Sized,
[src]
T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
[src]
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>,