diff options
author | epoch <epoch@hacking.allowed.org> | 2017-03-19 04:51:01 -0500 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2017-03-19 04:51:01 -0500 |
commit | 781ecd6529505e4bf1fd400634ee83bcb9a07c81 (patch) | |
tree | a5f51756d54dff5ebb47f5435198e1db15ce345d /src/math.c | |
parent | 17347b2e23292aad11c879d3df4a0e73c31e2ae8 (diff) | |
download | hackvr-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.c | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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; |