mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 21:52:42 +00:00
removed CLAMP01 define
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user