Documentation
    Preparing search index...

    Function formatLength

    • Formats an engine length for display: convert, then label.

      Formatting is the one place in this module that allocates, which is a second reason it belongs nowhere near a simulation path.

      Parameters

      • worldUnits: number

        the engine value

      • units: UnitSystem

        the declared system

      • OptionalfractionDigits: number

        forwarded to Number.prototype.toFixed, which throws RangeError outside 0–100; omitted means no rounding

      Returns string

      e.g. "150 cm"