Documentation
    Preparing search index...

    Function lengthToDisplay

    • Converts an engine length in world units to the declared display unit.

      The conversion is worldUnits × scale.lengthToMeters ÷ (metres per display unit), so a world authored in centimetres and displayed in centimetres is the exact identity, while the same world displayed in millimetres reads ten times larger — which is the whole point of declaring both.

      Parameters

      • worldUnits: number

        the engine value (a position component, a radius, …)

      • units: UnitSystem

        the declared system

      Returns number

      the same length expressed in units.length