Repository navigation
v6.0.0
Migration: FloatPointCompatible now uses an associated scalar type
FloatPointCompatible no longer takes the scalar as a generic parameter. Implementations should define type Scalar instead.
Before:
impl FloatPointCompatible<f32> for MyPoint {
fn from_xy(x: f32, y: f32) -> Self { ... }
fn x(&self) -> f32 { ... }
fn y(&self) -> f32 { ... }
}After:
impl FloatPointCompatible for MyPoint {
type Scalar = f32;
fn from_xy(x: f32, y: f32) -> Self { ... }
fn x(&self) -> f32 { ... }
fn y(&self) -> f32 { ... }
}Public float overlay APIs were simplified accordingly. Types that previously carried both point and scalar generics now generally use only the point type, with scalar values expressed as P::Scalar.