PointLike

Trait PointLike 

Source
pub trait PointLike<N: Float>:
    Copy
    + PartialEq
    + FromIntoPointLike<[N; 2]> {
    // Required methods
    fn x(&self) -> N;
    fn y(&self) -> N;
    fn with_x(&self, x: N) -> Self;
    fn with_y(&self, y: N) -> Self;
    fn with_xy(x: N, y: N) -> Self;
}
Expand description

A point-like type that can be used to define a coordinate in 2D space.

Required Methods§

Source

fn x(&self) -> N

Source

fn y(&self) -> N

Source

fn with_x(&self, x: N) -> Self

Source

fn with_y(&self, y: N) -> Self

Source

fn with_xy(x: N, y: N) -> 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.

Implementors§

Source§

impl<T, F: Float> PointLike<F> for T