diff options
author | epoch <epoch@thebackupbox.net> | 2020-04-14 05:55:46 -0500 |
---|---|---|
committer | epoch <epoch@thebackupbox.net> | 2020-04-14 05:55:46 -0500 |
commit | 67246b5142442af819f0285ad7d60b52e966e010 (patch) | |
tree | 2ce5dda9d4c4e16580e4c427a048a0fc821a4c98 /src/math.c | |
parent | 9931a28668db34e7f6975de1231ea23881d7c361 (diff) | |
download | hackvr-67246b5142442af819f0285ad7d60b52e966e010.tar.gz hackvr-67246b5142442af819f0285ad7d60b52e966e010.zip |
new function: c2_add. you can guess what it does.
Diffstat (limited to 'src/math.c')
-rw-r--r-- | src/math.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -193,6 +193,11 @@ c3_t c3_add(c3_t p1,c3_t p2) { return (c3_t){p1.x+p2.x,p1.y+p2.y,p1.z+p2.z}; } +//this could probably be a macro, or inline or whatever. and also work for cs_t +c2_t c2_add(c2_t p1,c2_t p2) { + return (c2_t){p1.x+p2.x,p1.y+p2.y}; +} + real distance3(c3_t p1,c3_t p2) { return sqrt(( (p1.x-p2.x)*(p1.x-p2.x) )+( (p1.y-p2.y)*(p1.y-p2.y) )+( (p1.z-p2.z)*(p1.z-p2.z) )); } |