Modulo:Infobox nave: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
r |
arrotondamento eccessivo |
||
(2 versioni intermedie di 2 utenti non mostrate) | |||
Riga 27:
---============================================================
-- arrotonda in base all'ordine di grandezza: 11111->11110, 1111->1111, 111->111,1
---============================================================
local function round_auto(num)
local base = - math.floor(math.log10(math.abs(num))) +
if base < -3 then base = -3 end
return round(num, base)
Riga 113:
function p.speed(frame)
local args = getArgs(frame, {frameOnly = true})
local spd_kn = args[1]
local spd_kmh = args[2]
local spd_type = args[3]
if spd_kmh == nil and spd_kn == nil then return '' end
Riga 145:
if range_type then dump(out, range_type, ":") end
if nmi_formatted then
dump(out, nmi_formatted, "
if kn_formatted then
dump(out, " a ", kn_formatted, " [[nodo (unità di misura)|nodi]]")
|