The wiki has moved!

Visit the new wiki at stationeers-wiki.com The old wiki here at legacy.stationeers-wiki.com will sunset eventually.

Edits made after the 7th of March 6PM EST were NOT carried over to the new server as previously announced right here in this box.

 Actions

Module

Difference between revisions of "Temperature"

From Unofficial Stationeers Wiki

m
m
Line 1: Line 1:
 
local p = {}
 
local p = {}
 
function p.main(frame)
 
function p.main(frame)
   local k = tonumber(frame.args[1]) or 0
+
   local k = frame.args[1] or 0
 
   local c = k - 273.15
 
   local c = k - 273.15
 
   return string.format("%g K (%.2f °C)", k, c)
 
   return string.format("%g K (%.2f °C)", k, c)
 
end
 
end
 
return p
 
return p

Revision as of 17:55, 27 August 2025

Documentation for this module may be created at Module:Temperature/doc

local p = {}
function p.main(frame)
  local k = frame.args[1] or 0
  local c = k - 273.15
  return string.format("%g K (%.2f °C)", k, c)
end
return p