diff options
author | epoch <epoch@hacking.allowed.org> | 2017-01-09 01:08:12 -0600 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2017-01-09 01:08:12 -0600 |
commit | d6e8fd3a5d3b6d07e26a00cbf610d5587e2840a4 (patch) | |
tree | 847db9464d84d8bf7eba496742ba27143e0ca0f2 /src/math.h | |
parent | 7716223ab6f9024300003097d680f498629175be (diff) | |
download | hackvr-d6e8fd3a5d3b6d07e26a00cbf610d5587e2840a4.tar.gz hackvr-d6e8fd3a5d3b6d07e26a00cbf610d5587e2840a4.zip |
made all versions get built by default and moved some functions from graphics.c into math.c so the headless does not need graphics.c
Diffstat (limited to 'src/math.h')
-rw-r--r-- | src/math.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/math.h b/src/math.h new file mode 100644 index 0000000..1afe959 --- /dev/null +++ b/src/math.h @@ -0,0 +1,18 @@ +#ifndef _HACKVR_MATH_H_ +#define _HACKVR_MATH_H_ + +#include "common.h" //should define c3_t + +#define __USE_GNU +#include <math.h> +#undef __USE_GNU + +real distance2(c2_t p1,c2_t p2); +c2_t rotate_c2(c2_t p1,c2_t p2,real dr); +c3_t rotate_c3_xr(c3_t p1,c3_t p2,real xr); +c3_t rotate_c3_yr(c3_t p1,c3_t p2,real yr); +c3_t rotate_c3_zr(c3_t p1,c3_t p2,real zr); +real d2r(int d); +real points_to_angle(c2_t p1,c2_t p2); + +#endif |