Merge remote-tracking branch 'refs/remotes/origin/master' into changelog-memes

This commit is contained in:
Poojawa
2018-09-10 23:51:25 -05:00
64 changed files with 580 additions and 300 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"