FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    minimum

    minimum: f64
    

    Source

    maximum

    maximum: f64
    

    Source

    spacing

    spacing: f64
    

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Copy
    • Debug
    • StructuralPartialEq
    • PartialEq

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.