summaryrefslogtreecommitdiff
path: root/vector.h
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2017-04-02 22:14:11 -0400
committerFranklin Wei <me@fwei.tk>2017-04-02 22:14:11 -0400
commit929df060cbd9c0da04b8d9ce70dcea9879f42f4a (patch)
tree8d39c317c3448d0a83f60427610a6c641af8fdb5 /vector.h
parentd6e9b142e014c3d171932894dbb0db0410e91af7 (diff)
downloadraytrace-929df060cbd9c0da04b8d9ce70dcea9879f42f4a.zip
raytrace-929df060cbd9c0da04b8d9ce70dcea9879f42f4a.tar.gz
raytrace-929df060cbd9c0da04b8d9ce70dcea9879f42f4a.tar.bz2
raytrace-929df060cbd9c0da04b8d9ce70dcea9879f42f4a.tar.xz
lighting
Diffstat (limited to 'vector.h')
-rw-r--r--vector.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/vector.h b/vector.h
index 24773c7..3838b63 100644
--- a/vector.h
+++ b/vector.h
@@ -1,6 +1,6 @@
#include <math.h>
-typedef double scalar;
+typedef float scalar;
typedef struct vector_t {
enum { RECT, SPH } type;
@@ -23,5 +23,6 @@ void vect_to_rect(vector*);
void vect_to_sph(vector*);
void vect_sub(vector*, const vector*);
void vect_negate(vector*);
+void vect_normalize(vector*);
scalar vect_dot(const vector *v1, const vector *v2);