From b24aa5d041bfacbea5190bb778a5a44c328d3ee9 Mon Sep 17 00:00:00 2001 From: streetturtle Date: Sat, 24 Mar 2018 21:03:36 -0400 Subject: make functions local --- weather-widget/weather.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'weather-widget') diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua index 43ce974..a279d99 100644 --- a/weather-widget/weather.lua +++ b/weather-widget/weather.lua @@ -61,12 +61,12 @@ local icon_map = { } -- handy function to convert temperature from Kelvin to Celcius -function to_celcius(kelvin) +local function to_celcius(kelvin) return math.floor(tonumber(kelvin) - 273.15) end -- Return wind direction as a string. -function to_direction(degrees) +local function to_direction(degrees) local directions = { { "N", 348.75, 360 }, { "N", 0, 11.25 }, -- cgit v1.2.3