This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int hpa_to_scale(float hpa_value) { | |
// Define the range of HPA values that will correspond to the 1-10 scale | |
float min_hpa = 950.0; | |
float max_hpa = 1030.0; | |
// Normalize the HPA value to fall within the defined range | |
float normalized_hpa = fmax(fmin(hpa_value, max_hpa), min_hpa); | |
// Scale the normalized HPA value to the 1-10 range | |
int scale_value = round((normalized_hpa - min_hpa) * 10.0 / (max_hpa - min_hpa) + 1.0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local width = 0 | |
local height = 0 | |
local locX = 1; | |
local locZ = 1; | |
local locY = 0; | |
local removedTop = false; | |
if #arg == 2 then |
NewerOlder