Skip to main content

Center

Struct Center 

Source
pub struct Center<K: Scalar = f64> {
    pub t: K,
    pub x: K,
    pub y: K,
}
Expand description

A center of some transformation in ℍ²: a point, ideal point, or line.

Fields§

§t: K§x: K§y: K

Implementations§

Source§

impl<K: Scalar> Center<K>

Source

pub fn classify(self) -> CenterKind<K>

Determine the kind of center.

In the case an operation gives a generic center object where you expect otherwise, see that individual operation for specific interpretations of each result. e.g. the intersection of two ultraparallel lines gives their unique common perpendicular.

Trait Implementations§

Source§

impl<K: Scalar> Add for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: Center<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<Center<K>> for WeightedPoint<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: Center<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<Center<K>> for Point<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: Center<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<Center<K>> for IdealPoint<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: Center<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<Center<K>> for WeightedLine<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: Center<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<Center<K>> for Line<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: Center<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<IdealPoint<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: IdealPoint<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<Line<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: Line<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<Point<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: Point<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<WeightedLine<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: WeightedLine<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> Add<WeightedPoint<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the + operator.
Source§

fn add(self, other: WeightedPoint<K>) -> Self::Output

Performs the + operation. Read more
Source§

impl<K: Scalar> AddAssign for Center<K>

Source§

fn add_assign(&mut self, other: Center<K>)

Performs the += operation. Read more
Source§

impl<K: Scalar> AddAssign<IdealPoint<K>> for Center<K>

Source§

fn add_assign(&mut self, other: IdealPoint<K>)

Performs the += operation. Read more
Source§

impl<K: Scalar> AddAssign<Line<K>> for Center<K>

Source§

fn add_assign(&mut self, other: Line<K>)

Performs the += operation. Read more
Source§

impl<K: Scalar> AddAssign<Point<K>> for Center<K>

Source§

fn add_assign(&mut self, other: Point<K>)

Performs the += operation. Read more
Source§

impl<K: Scalar> AddAssign<WeightedLine<K>> for Center<K>

Source§

fn add_assign(&mut self, other: WeightedLine<K>)

Performs the += operation. Read more
Source§

impl<K: Scalar> AddAssign<WeightedPoint<K>> for Center<K>

Source§

fn add_assign(&mut self, other: WeightedPoint<K>)

Performs the += operation. Read more
Source§

impl<K: Clone + Scalar> Clone for Center<K>

Source§

fn clone(&self) -> Center<K>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<K: Copy + Scalar> Copy for Center<K>

Source§

impl<K: Debug + Scalar> Debug for Center<K>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<K: Scalar> From<IdealPoint<K>> for Center<K>

Source§

fn from(value: IdealPoint<K>) -> Self

Converts to this type from the input type.
Source§

impl<K: Scalar> From<Line<K>> for Center<K>

Source§

fn from(value: Line<K>) -> Self

Converts to this type from the input type.
Source§

impl<K: Scalar> From<Point<K>> for Center<K>

Source§

fn from(value: Point<K>) -> Self

Converts to this type from the input type.
Source§

impl<K: Scalar> From<WeightedLine<K>> for Center<K>

Source§

fn from(value: WeightedLine<K>) -> Self

Converts to this type from the input type.
Source§

impl<K: Scalar> From<WeightedPoint<K>> for Center<K>

Source§

fn from(value: WeightedPoint<K>) -> Self

Converts to this type from the input type.
Source§

impl<K: Scalar> Mul<K> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the * operator.
Source§

fn mul(self, other: K) -> Self::Output

Performs the * operation. Read more
Source§

impl<K: Scalar> MulAssign<K> for Center<K>

Source§

fn mul_assign(&mut self, other: K)

Performs the *= operation. Read more
Source§

impl<K: Scalar> Multivector for Center<K>

Source§

const HAS_T: bool = true

Whether the t component is ever non-zero for this type.
Source§

const HAS_X: bool = true

Whether the x component is ever non-zero for this type.
Source§

const HAS_Y: bool = true

Whether the y component is ever non-zero for this type.
Source§

const UNITIZED: bool = false

Whether elements of this type are always unitized up to rounding. i.e. x.antidot(x) always approximately equals ±1.
Source§

type K = K

Scalar type for this multivector. The type of each component.
Source§

fn t(self) -> K

The t component.
Source§

fn x(self) -> K

The x component.
Source§

fn y(self) -> K

The y component.
Source§

fn from_all_components(components: [K; 8]) -> Self

Collect a value of Self from the relevant components. Read more
Source§

const HAS_K: bool = false

Whether the k (scalar) component is ever non-zero for this type.
Source§

const HAS_TX: bool = false

Whether the tx component is ever non-zero for this type.
Source§

const HAS_TY: bool = false

Whether the ty component is ever non-zero for this type.
Source§

const HAS_XY: bool = false

Whether the xy component is ever non-zero for this type.
Source§

const HAS_TXY: bool = false

Whether the txy component is ever non-zero for this type.
Source§

fn k(self) -> Self::K

The k (scalar) component.
Source§

fn tx(self) -> Self::K

The tx component.
Source§

fn ty(self) -> Self::K

The ty component.
Source§

fn xy(self) -> Self::K

The xy component.
Source§

fn txy(self) -> Self::K

The txy component.
Source§

fn dot<M: Multivector<K = Self::K>>(self, rhs: M) -> Self::K

The dot product self ∙ rhs. Read more
Source§

fn antidot<M: Multivector<K = Self::K>>(self, rhs: M) -> Self::K

The antidot product self ∘ rhs. Read more
Source§

impl<K: Scalar> Sub for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Center<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<Center<K>> for WeightedPoint<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Center<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<Center<K>> for Point<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Center<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<Center<K>> for IdealPoint<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Center<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<Center<K>> for WeightedLine<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Center<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<Center<K>> for Line<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Center<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<IdealPoint<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: IdealPoint<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<Line<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Line<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<Point<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Point<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<WeightedLine<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: WeightedLine<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> Sub<WeightedPoint<K>> for Center<K>

Source§

type Output = Center<K>

The resulting type after applying the - operator.
Source§

fn sub(self, other: WeightedPoint<K>) -> Self::Output

Performs the - operation. Read more
Source§

impl<K: Scalar> SubAssign for Center<K>

Source§

fn sub_assign(&mut self, other: Center<K>)

Performs the -= operation. Read more
Source§

impl<K: Scalar> SubAssign<IdealPoint<K>> for Center<K>

Source§

fn sub_assign(&mut self, other: IdealPoint<K>)

Performs the -= operation. Read more
Source§

impl<K: Scalar> SubAssign<Line<K>> for Center<K>

Source§

fn sub_assign(&mut self, other: Line<K>)

Performs the -= operation. Read more
Source§

impl<K: Scalar> SubAssign<Point<K>> for Center<K>

Source§

fn sub_assign(&mut self, other: Point<K>)

Performs the -= operation. Read more
Source§

impl<K: Scalar> SubAssign<WeightedLine<K>> for Center<K>

Source§

fn sub_assign(&mut self, other: WeightedLine<K>)

Performs the -= operation. Read more
Source§

impl<K: Scalar> SubAssign<WeightedPoint<K>> for Center<K>

Source§

fn sub_assign(&mut self, other: WeightedPoint<K>)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<K> Freeze for Center<K>
where K: Freeze,

§

impl<K> RefUnwindSafe for Center<K>
where K: RefUnwindSafe,

§

impl<K> Send for Center<K>
where K: Send,

§

impl<K> Sync for Center<K>
where K: Sync,

§

impl<K> Unpin for Center<K>
where K: Unpin,

§

impl<K> UnsafeUnpin for Center<K>
where K: UnsafeUnpin,

§

impl<K> UnwindSafe for Center<K>
where K: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.