removed CLAMP01 define

This commit is contained in:
spookerton
2022-03-31 19:22:07 +01:00
parent 602cc67d2b
commit 7fd5fd66b8
3 changed files with 2 additions and 4 deletions

View File

@@ -9,8 +9,6 @@
#define SHORT_REAL_LIMIT 16777216 #define SHORT_REAL_LIMIT 16777216
#define CLAMP01(x) clamp(x, 0, 1)
#define TAN(x) tan(x) #define TAN(x) tan(x)
#define ATAN2(x, y) arctan(x, y) #define ATAN2(x, y) arctan(x, y)

View File

@@ -189,7 +189,7 @@
); );
// This is the define used to calculate falloff. // This is the define used to calculate falloff.
#define LUM_FALLOFF(C, T)(1 - CLAMP01(((C.x - T.x) ** 2 +(C.y - T.y) ** 2 + LIGHTING_HEIGHT) ** 0.6 / max(1, light_range))) #define LUM_FALLOFF(C, T)(1 - clamp(((C.x - T.x) ** 2 +(C.y - T.y) ** 2 + LIGHTING_HEIGHT) ** 0.6 / max(1, light_range), 0, 1))
/datum/light_source/proc/apply_lum() /datum/light_source/proc/apply_lum()
var/static/update_gen = 1 var/static/update_gen = 1

View File

@@ -54,7 +54,7 @@
totallums =(totallums - minlum) /(maxlum - minlum) totallums =(totallums - minlum) /(maxlum - minlum)
return CLAMP01(totallums) return clamp(totallums, 0, 1)
// Can't think of a good name, this proc will recalculate the has_opaque_atom variable. // Can't think of a good name, this proc will recalculate the has_opaque_atom variable.
/turf/proc/recalc_atom_opacity() /turf/proc/recalc_atom_opacity()