NumericRange
struct · ferroui-controls-charts · v0.5.0
struct NumericRange
Resolved layout data of a numeric axis. This is a value snapshot, separate from the notifying axis object and safe to use during scene construction.
Members
minimum
minimum: f64
maximum
maximum: f64
spacing
spacing: f64
MAX_TICKS
const MAX_TICKS: usize
The maximum number of ticks emitted by Self::ticks. Explicit
subpixel spacing is sampled at an integer multiple of its interval.
from_values
fn from_values(values: &[f64], minimum: Option<f64>, maximum: Option<f64>, spacing: Option<f64>, target_tick_count: usize) -> Self
Resolves bounds without requiring a property-system object.
normalize
fn normalize(self: &Self, value: f64) -> f64
Maps a value to axis coordinates without clipping to the axis domain.
Scaled subtraction avoids overflow at opposite floating-point extrema.
A finite value whose coordinate exceeds the representable range
saturates to -f64::MAX or f64::MAX, retaining its side of the domain
for line clipping. Non-finite sample values remain non-finite.
ticks
fn ticks(self: &Self) -> Vec<f64>
Finite, strictly increasing major ticks, aligned to multiples of the chosen spacing. Work and allocation remain bounded for tiny spacing.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCloneCopyDebugStructuralPartialEqPartialEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.