pub trait CoordStorage: Copy + PartialOrd {
// Required methods
fn to_f64(self) -> f64;
fn to_i64(self) -> i64;
}Expand description
Coordinate storage for Polygon.
The polygon’s bounding box, acceleration indexes and raycast all operate in
“storage space”: the query point is multiplied by the polygon’s scale once
per containment check, and segment endpoints are converted with
CoordStorage::to_f64 in registers. f64::from(i32) is exact (i32
fits within f64’s 53-bit mantissa), so integer storage loses no
precision, and x * 1.0 is an exact identity, so f64 storage behaves
bit-identically to a non-generic implementation.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".