/** requires the same as boxesoverlap, but is a stronger condition */
float boxinsidebox(vector smins, vector smaxs, vector bmins, vector bmaxs) { return smins.x >= bmins.x && smaxs.x <= bmaxs.x && smins.y >= bmins.y && smaxs.y <= bmaxs.y && smins.z >= bmins.z && smaxs.z <= bmaxs.z; }
+#define PITCH(v) (v).x
+#define YAW(v) (v).y
+#define ROLL(v) (v).z
+
+#define MAKEVECTORS(f, angles, forward, right, up) do { \
+ f(angles); \
+ forward = v_forward; \
+ right = v_right; \
+ up = v_up; \
+} while (0)
vector vec2(vector v)
{
return v;
}
+vector rotate(vector v, float a)
+{
+ float a_sin = sin(a), a_cos = cos(a);
+ vector r = '0 0 0';
+ r.x = v.x * a_cos + v.y * a_sin;
+ r.y = -1 * v.x * a_sin + v.y * a_cos;
+ return r;
+}
+
+vector yinvert(vector v)
+{
+ v.y = 1 - v.y;
+ return v;
+}
+
#ifndef MENUQC
vector get_corner_position(entity box, int corner)
{