Browse Source

small rotate opts

cxgeorge 25 years ago
parent
commit
dd5e676818
2 changed files with 7 additions and 4 deletions
  1. 3 2
      panda/src/linmath/lmatrix3_src.I
  2. 4 2
      panda/src/linmath/lmatrix4_src.I

+ 3 - 2
panda/src/linmath/lmatrix3_src.I

@@ -782,8 +782,9 @@ rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis,
 
   // Normalize the axis.  
   
-  // hack check for prenormalization, only works for simple unit vecs, which
-  // is what we usually pass in anyway.  need to add flag parameter so caller
+  // hack check for prenormalization, only works for simple unit vecs, 
+  // which is what we usually pass in anyway. screws up if you happen to
+  // pass in something like (.5,.5,0).  need to add flag parameter so caller
   // can request normalization if needed
   if((axis_0+axis_1+axis_2) != 1.0) {
 	  FLOATTYPE length_sq = axis_0 * axis_0 + axis_1 * axis_1 + axis_2 * axis_2;

+ 4 - 2
panda/src/linmath/lmatrix4_src.I

@@ -1138,8 +1138,10 @@ rotate_mat(FLOATTYPE angle, FLOATNAME(LVecBase3) axis,
 
   // Normalize the axis.  
   
-  // hack check for prenormalization, only works for simple unit vecs, which
-  // is what we usually pass in anyway.  need to add flag parameter so caller
+ 
+  // hack check for prenormalization, only works for simple unit vecs, 
+  // which is what we usually pass in anyway. screws up if you happen to
+  // pass in something like (.5,.5,0).  need to add flag parameter so caller
   // can request normalization if needed
   if((axis_0+axis_1+axis_2) != 1.0) {
 	  FLOATTYPE length_sq = axis_0 * axis_0 + axis_1 * axis_1 + axis_2 * axis_2;