summaryrefslogtreecommitdiff
path: root/src/math.c
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2017-03-19 04:51:01 -0500
committerepoch <epoch@hacking.allowed.org>2017-03-19 04:51:01 -0500
commit781ecd6529505e4bf1fd400634ee83bcb9a07c81 (patch)
treea5f51756d54dff5ebb47f5435198e1db15ce345d /src/math.c
parent17347b2e23292aad11c879d3df4a0e73c31e2ae8 (diff)
downloadhackvr-781ecd6529505e4bf1fd400634ee83bcb9a07c81.tar.gz
hackvr-781ecd6529505e4bf1fd400634ee83bcb9a07c81.zip
I have no idea why I am doing this...
Diffstat (limited to 'src/math.c')
-rw-r--r--src/math.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/math.c b/src/math.c
index 0f74f3d..b5c82de 100644
--- a/src/math.c
+++ b/src/math.c
@@ -1,6 +1,19 @@
+#include <string.h>
+#include "common.h"
#include "math.h"
-//should these use the radians struct?
+extern struct global global;
+
+//might change this to use hashtables for faster lookups.
+c3_group_rot_t *get_group_rotation(char *id) {
+ int i;
+ for(i=0;global.group_rot[i];i++) {
+ if(!strcmp(global.group_rot[i]->id,id)) {
+ return global.group_rot[i];
+ }
+ }
+ return 0;//need to be sure to check return value for this function!
+}
c3_t rotate_c3_xr(c3_t p1,c3_t p2,radians xr) {//rotate y and z around camera based on xr (looking up and down)
c2_t tmp;