aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2012-03-16 10:52:04 +0100
committerWolfgang Draxinger <Wolfgang.Draxinger@draxit.de>2012-03-16 10:52:04 +0100
commitb222344f57471fe74ed343d627fcec27968fa86a (patch)
tree435f57263d311d530cfd888802a6c28b76afd2a7
parent631284edc2542623da8b012db7ba866ee4ac7dc5 (diff)
downloadlinmath-b222344f57471fe74ed343d627fcec27968fa86a.tar.gz
linmath-b222344f57471fe74ed343d627fcec27968fa86a.tar.xz
linmath-b222344f57471fe74ed343d627fcec27968fa86a.zip
fixed vec<n>_length vs. vec<n>_len, rotation matrix intermediary rotscale matrix element WW=1 now
-rw-r--r--linmath.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/linmath.h b/linmath.h
index 5e51e3c..a59870e 100644
--- a/linmath.h
+++ b/linmath.h
@@ -45,7 +45,7 @@ static inline float vec3_len(vec3 v)
}
static inline void vec3_norm(vec3 r, vec3 v)
{
- float k = 1.0 / vec3_length(v);
+ float k = 1.0 / vec3_len(v);
vec3_scale(r, v, k);
}
@@ -91,7 +91,7 @@ static inline float vec4_len(vec4 v)
}
static inline void vec4_norm(vec4 r, vec4 v)
{
- float k = 1.0 / vec4_length(v);
+ float k = 1.0 / vec4_len(v);
vec4_scale(r, v, k);
}
@@ -179,7 +179,7 @@ static inline void mat4x4_rotate(mat4x4 Q, mat4x4 M, float x, float y, float z,
{ 0, u[2], -u[1], 0},
{-u[2], 0, u[0], 0},
{ u[1], -u[0], 0, 0},
- { 0, 0, 0, 0}
+ { 0, 0, 0, 1}
};
mat4x4_scale(S, S, s);