pub trait CurvePoint<F: Float>: Clone + PartialEq {
// Required methods
fn add(&self, other: &Self) -> Self;
fn sub(&self, other: &Self) -> Self;
fn multiply(&self, other: &Self) -> Self;
fn scale(&self, s: F) -> Self;
}
Expand description
CurvePoint is a point in space that can be added, subtracted, multiplied, and scaled. This trait can be implemented for any type like Point, Vector, Color, etc.
Required Methods§
fn add(&self, other: &Self) -> Self
fn sub(&self, other: &Self) -> Self
fn multiply(&self, other: &Self) -> Self
fn scale(&self, s: F) -> 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.