浏览代码

Fix bug in CrossProduct function in boing example

Closes #1418.
maobaoqi 6 年之前
父节点
当前提交
29d8ca4ce4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/boing.c

+ 1 - 1
examples/boing.c

@@ -165,7 +165,7 @@ void CrossProduct( vertex_t a, vertex_t b, vertex_t c, vertex_t *n )
    v2 = c.y - a.y;
    v3 = c.z - a.z;
 
-   n->x = u2 * v3 - v2 * v3;
+   n->x = u2 * v3 - v2 * u3;
    n->y = u3 * v1 - v3 * u1;
    n->z = u1 * v2 - v1 * u2;
 }