[−][src]Struct pathtracer::Coordinate
Fields
x: i16
y: i16
Methods
impl Coordinate
[src]
pub fn new(x: i16, y: i16) -> Self
[src]
Constructs a Coordinate struct.
Examples
Coordinate::new(10, 10);
Invocation can be done used the macro coordinate!
coordinate!(10);
These are equal.
let a = coordinate!(10); let b = Coordinate::new(10, 10); assert_eq!(a, b);
pub fn lt(self, lt: i16) -> bool
[src]
Returns true if either x or y is less than the input.
Examples
let c = Coordinate::new(10, 10); assert!(c.lt(11));
pub fn abs(self) -> Coordinate
[src]
Returns the absolute coordinate equivilent.
Examples
let c = Coordinate::new(-10, 10); assert_eq!(c.abs(), Coordinate::new(10, 10));
pub fn from_list(list: &[(i16, i16)]) -> Vec<Coordinate>
[src]
Creates a list of coordinates from a list of tuples with x and y positions.
Trait Implementations
impl Add<Coordinate> for Coordinate
[src]
type Output = Coordinate
The resulting type after applying the +
operator.
fn add(self, other: Coordinate) -> Coordinate
[src]
impl AddAssign<Coordinate> for Coordinate
[src]
fn add_assign(&mut self, other: Coordinate)
[src]
impl Clone for Coordinate
[src]
fn clone(&self) -> Coordinate
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Coordinate
[src]
impl Debug for Coordinate
[src]
impl Default for Coordinate
[src]
fn default() -> Coordinate
[src]
impl Display for Coordinate
[src]
impl Eq for Coordinate
[src]
impl From<Coordinate> for Node
[src]
fn from(c: Coordinate) -> Self
[src]
impl From<Coordinate> for Group
[src]
fn from(c: Coordinate) -> Self
[src]
impl From<Group> for Coordinate
[src]
impl From<Node> for Coordinate
[src]
impl Location for Coordinate
[src]
fn position(&self) -> Coordinate
[src]
fn eq<L: Location>(&self, other: &L) -> bool
[src]
fn x(&self) -> i16
[src]
fn y(&self) -> i16
[src]
fn sum(&self) -> i16
[src]
impl Mul<Coordinate> for Coordinate
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self
[src]
impl Ord for Coordinate
[src]
fn cmp(&self, other: &Coordinate) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Coordinate> for Coordinate
[src]
fn eq(&self, other: &Coordinate) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Coordinate> for Coordinate
[src]
fn partial_cmp(&self, other: &Coordinate) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Coordinate
[src]
impl Sub<Coordinate> for Coordinate
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Coordinate) -> Coordinate
[src]
impl SubAssign<Coordinate> for Coordinate
[src]
fn sub_assign(&mut self, other: Coordinate)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Coordinate
impl Send for Coordinate
impl Sync for Coordinate
impl Unpin for Coordinate
impl UnwindSafe for Coordinate
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> 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
[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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,