mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
33 lines
746 B
Plaintext
33 lines
746 B
Plaintext
#if DM_VERSION < 513
|
|
|
|
#define ismovable(A) (istype(A, /atom/movable))
|
|
|
|
#define islist(L) (istype(L, /list))
|
|
|
|
#define CLAMP01(x) (CLAMP(x, 0, 1))
|
|
|
|
#define CLAMP(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
|
|
|
|
#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )
|
|
|
|
#define TAN(x) (sin(x) / cos(x))
|
|
|
|
#define arctan(x) (arcsin(x/sqrt(1+x*x)))
|
|
|
|
#define between(x, y, z) max(min(y, z), x)
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
#else
|
|
|
|
#define CLAMP01(x) clamp(x, 0, 1)
|
|
|
|
#define CLAMP(CLVALUE, CLMIN, CLMAX) clamp(CLVALUE, CLMIN, CLMAX)
|
|
|
|
#define TAN(x) tan(x)
|
|
|
|
#define ATAN2(x, y) arctan(x, y)
|
|
|
|
#define between(x, y, z) clamp(y, x, z)
|
|
|
|
#endif |