pub trait ContinuousScale {
// Required methods
fn map(&self, value: f64) -> f64;
fn domain(&self) -> (f64, f64);
fn range(&self) -> (f64, f64);
fn ticks(&self, count: usize) -> Vec<f64>;
fn clamp(&self, value: f64) -> f64;
}Expand description
Common interface for continuous scales. Note: Each scale type also has its own specific methods beyond this trait.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".