浏览代码

Merge pull request #49 from linkmauve/normalize_vec3f-fix

Fix a copy/paste issue failing to normalize a vec3f when only its y component isn’t zero
Jakob Bornecrantz 9 年之前
父节点
当前提交
06729171c3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/omath.c

+ 1 - 1
src/omath.c

@@ -19,7 +19,7 @@ float ovec3f_get_length(const vec3f* me)
 
 void ovec3f_normalize_me(vec3f* me)
 {
-	if(me->x == 0 && me->x == 0 && me->z == 0)
+	if(me->x == 0 && me->y == 0 && me->z == 0)
 		return;
 
 	float len = ovec3f_get_length(me);