Commit 80e809f1d4b10e9a5fdeffc1d62773110f280205

sammy 2008-05-02T07:21:09

* Fix brown-paper-bag bug in the vector product computation: the indices were completely messed up. Thanks to valgrind for spotting it for me.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/FTGL/FTPoint.h b/src/FTGL/FTPoint.h
index a95e858..0911f24 100644
--- a/src/FTGL/FTPoint.h
+++ b/src/FTGL/FTPoint.h
@@ -188,11 +188,11 @@ class FTGL_EXPORT FTPoint
         {
             FTPoint temp;
             temp.values[0] = values[1] * point.values[2]
-                           - values[2] * point.values[1];
-            temp.values[1] = values[2] * point.values[3]
-                           - values[3] * point.values[2];
-            temp.values[2] = values[3] * point.values[0]
-                           - values[0] * point.values[3];
+                              - values[2] * point.values[1];
+            temp.values[1] = values[2] * point.values[0]
+                              - values[0] * point.values[2];
+            temp.values[2] = values[0] * point.values[1]
+                              - values[1] * point.values[0];
             return temp;
         }