GE Lua Documentation

Press F to search!

distanceMinor

Definition


-- @/lua/ge/extensions/ui/vehicleSelector/vehicleSpecifications.lua:263
  distanceMinor = function(value)
    if not type(value) == 'number' then
      return tostring(value)
    end
    local metricOrImperial = settings.getValue('uiUnitLength')
    -- value is in m
    if metricOrImperial == 'metric' then
      return string.format("%0.2f m", value)
    else
      return string.format("%0.2f ft", value * CONVERSIONS.M_TO_FT)
    end
  end,

Callers