Initial Commit

This commit is contained in:
kevinz000
2018-09-03 10:35:47 -07:00
parent a8a6bcd23e
commit 2bf5e6af58
7 changed files with 170 additions and 129 deletions
+22
View File
@@ -143,6 +143,17 @@
if(337.5 to 360)
return NORTH
/proc/angle2dir_cardinal(angle)
switch(round(angle, 0.1))
if(315.5 to 360, 0 to 45.5)
return NORTH
if(45.6 to 135.5)
return EAST
if(135.6 to 225.5)
return SOUTH
if(225.6 to 315.5)
return WEST
//returns the north-zero clockwise angle in degrees, given a direction
/proc/dir2angle(D)
switch(D)
@@ -437,6 +448,17 @@
else
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
/proc/fusionpower2text(power) //used when displaying fusion power on analyzers
switch(power)
if(0 to 5)
return "low"
if(5 to 20)
return "mid"
if(20 to 50)
return "high"
if(50 to INFINITY)
return "super"
/proc/color2hex(color) //web colors
if(!color)
return "#000000"