From 781ecd6529505e4bf1fd400634ee83bcb9a07c81 Mon Sep 17 00:00:00 2001 From: epoch Date: Sun, 19 Mar 2017 04:51:01 -0500 Subject: I have no idea why I am doing this... --- src/math.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/math.c') 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 +#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; -- cgit v1.2.3