Trait FloatPoint

Source
pub trait FloatPoint<N>: IntoIntegerPoint + Point<Scalar = f32> {
    // Required methods
    fn round(self) -> Self;
    fn floor(self) -> Self;
    fn ceil(self) -> Self;
    fn fract(self) -> Self;

    // Provided method
    fn floor_int(self) -> Self::IntPoint { ... }
}

Required Methods§

Source

fn round(self) -> Self

Source

fn floor(self) -> Self

Source

fn ceil(self) -> Self

Source

fn fract(self) -> Self

Provided Methods§

Source

fn floor_int(self) -> Self::IntPoint

Ensures that you floor before casting to integers, since this is not the default behavior for negative integers.

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<N> FloatPoint<N> for PointN<N>
where PointN<N>: IntoIntegerPoint + Point<Scalar = f32>,

OSZAR »