Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Function decadeStep

    • Largest power of ten at or below v, floored at 1e-6 — a slider step whose String() form is an exact short decimal.

      The GUI derives a controller's displayed decimal count from the textual step representation (slider-kit/format.ts), so that representation is load-bearing, not just its magnitude:

      • A scene-derived value carries float noise. String(1.05e-4) is "0.00010499999999999999" → 20 decimals → a near of 117.5 renders as "117.50000000000000000000".

      decimalsForStep now handles exponent form, so only the POWER-OF-TEN result remains load-bearing: its String() is short and exact. The -6 floor is no longer required for display precision; it preserves the established minimum interaction step. Only that power-of-ten result is load-bearing; the literal spelling is not: Number('1e'+e) and Math.pow(10, e) were measured identical at every exponent from -13 to +12, so either works — the literal just reads as the intent.

      Exported for test. The float-noise accommodation belongs at this caller, where the scene-derived step is chosen.

      Parameters

      • v: number

      Returns number