Skip to main content

Point

Trait Point 

Source
pub trait Point<V>: Sized + Sub<Self, Output = V>
where V: AdditiveGroup + GroupAction<Self>,
{ // Required methods fn to_vector(self) -> V; fn from_vector(vector: V) -> Self; // Provided method fn origin() -> Self { ... } }
Expand description

Point types convertible to and from a vector type, with difference function that follows from the free and transitive group action

Required Methods§

Source

fn to_vector(self) -> V

Source

fn from_vector(vector: V) -> Self

Provided Methods§

Source

fn origin() -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Point<f32> for f32

Source§

fn to_vector(self) -> f32

Source§

fn from_vector(vector: f32) -> Self

Source§

impl Point<f64> for f64

Source§

fn to_vector(self) -> f64

Source§

fn from_vector(vector: f64) -> Self

Implementors§

Source§

impl<S, U> Point<Displacement2<S, U>> for Position2<S, U>
where S: Ring,

Source§

impl<S, U> Point<Displacement3<S, U>> for Position3<S, U>
where S: Ring,

Source§

impl<S, U> Point<Displacement4<S, U>> for Position4<S, U>
where S: Ring,

Source§

impl<S: Ring> Point<Vec2<S>> for Point2<S>

Source§

impl<S: Ring> Point<Vec3<S>> for Point3<S>

Source§

impl<S: Ring> Point<Vec4<S>> for Point4<S>