Struct otter_base::geometry::PosC
source · [−]Fields
coords: [T; 2]
Implementations
sourceimpl<T> PosC<T>
impl<T> PosC<T>
pub const fn new(x: T, y: T) -> Self
pub fn both(v: T) -> Self where
T: Copy,
pub fn zero() -> Self where
T: Zero + Copy,
pub fn coords(self) -> impl ExactSizeIterator<Item = T> + FusedIterator
pub fn len2(self) -> Result<f64, CoordinateOverflow> where
PosC<T>: PosPromote,
pub fn len(self) -> Result<f64, CoordinateOverflow> where
PosC<T>: PosPromote,
sourceimpl<T> PosC<T>
impl<T> PosC<T>
pub fn from_iter<I: Iterator<Item = T>>(
i: I
) -> Result<Self, PosCFromIteratorError>
Trait Implementations
sourceimpl<T: CheckedArith> Add<PosC<T>> for PosC<T>
impl<T: CheckedArith> Add<PosC<T>> for PosC<T>
sourceimpl<'de, T> Deserialize<'de> for PosC<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for PosC<T> where
T: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<S: Copy + Debug + Clone + 'static, T: CheckedArithMul<S>> Mul<S> for PosC<T>
impl<S: Copy + Debug + Clone + 'static, T: CheckedArithMul<S>> Mul<S> for PosC<T>
type Output = Result<PosC<T>, CoordinateOverflow>
type Output = Result<PosC<T>, CoordinateOverflow>
The resulting type after applying the *
operator.
sourceimpl<T: CheckedArith> Neg for PosC<T>
impl<T: CheckedArith> Neg for PosC<T>
type Output = Result<PosC<T>, CoordinateOverflow>
type Output = Result<PosC<T>, CoordinateOverflow>
The resulting type after applying the -
operator.
sourcefn neg(self) -> Result<Self, CoordinateOverflow>
fn neg(self) -> Result<Self, CoordinateOverflow>
Performs the unary -
operation. Read more
sourceimpl<T: Ord> Ord for PosC<T>
impl<T: Ord> Ord for PosC<T>
sourceimpl<T: PartialOrd> PartialOrd<PosC<T>> for PosC<T>
impl<T: PartialOrd> PartialOrd<PosC<T>> for PosC<T>
sourcefn partial_cmp(&self, other: &PosC<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &PosC<T>) -> 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
sourceimpl<T: CheckedArith> Sub<PosC<T>> for PosC<T>
impl<T: CheckedArith> Sub<PosC<T>> for PosC<T>
impl<T: Copy> Copy for PosC<T>
impl<T: Eq> Eq for PosC<T>
impl<T> StructuralEq for PosC<T>
impl<T> StructuralPartialEq for PosC<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for PosC<T> where
T: RefUnwindSafe,
impl<T> Send for PosC<T> where
T: Send,
impl<T> Sync for PosC<T> where
T: Sync,
impl<T> Unpin for PosC<T> where
T: Unpin,
impl<T> UnwindSafe for PosC<T> where
T: UnwindSafe,
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