diff options
Diffstat (limited to '')
| -rw-r--r-- | src/vector.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/vector.c b/src/vector.c deleted file mode 100644 index 7274cbb..0000000 --- a/src/vector.c +++ /dev/null @@ -1,27 +0,0 @@ -#include <math.h> - -#include "vector.h" - -static inline double vec3_magnitude(Vec3 v) { - return hypot(v.x, hypot(v.y, v.z)); -} - -static inline Vec3 vec3_diff(Vec3 a, Vec3 b) { - return (Vec3){.x = a.x - b.x, - .y = a.y - b.y, - .z = a.z - b.z}; -} - -static inline Vec3 vec3_normalize(Vec3 v) { - double len = sqrt(v.x * v.x - + v.y * v.y - + v.z * v.z); - if (len != 0.0) - return (Vec3){.x = v.x / len, - .y = v.y / len, - .z = v.z / len}; -} - -static inline Vec3 vec3_mul(Vec3 v, double n) { - -} |
