Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
8da0ae3359
3 changed files with 3 additions and 3 deletions
  1. 1 1
      panda/src/linmath/lvector2.I
  2. 1 1
      panda/src/linmath/lvector3.I
  3. 1 1
      panda/src/linmath/lvector4.I

+ 1 - 1
panda/src/linmath/lvector2.I

@@ -199,7 +199,7 @@ template<class NumType>
 INLINE bool LVector2<NumType>::
 INLINE bool LVector2<NumType>::
 normalize() {
 normalize() {
   NumType l2 = length_squared();
   NumType l2 = length_squared();
-  if (l2 == 0.0) {
+  if (l2 == (NumType)0.0) {
     set(0.0, 0.0);
     set(0.0, 0.0);
     return false;
     return false;
 
 

+ 1 - 1
panda/src/linmath/lvector3.I

@@ -211,7 +211,7 @@ template<class NumType>
 INLINE bool LVector3<NumType>::
 INLINE bool LVector3<NumType>::
 normalize() {
 normalize() {
   NumType l2 = length_squared();
   NumType l2 = length_squared();
-  if (l2 == 0.0) {
+  if (l2 == (NumType)0.0) {
     set(0.0, 0.0, 0.0);
     set(0.0, 0.0, 0.0);
     return false;
     return false;
 
 

+ 1 - 1
panda/src/linmath/lvector4.I

@@ -222,7 +222,7 @@ template<class NumType>
 INLINE bool LVector4<NumType>::
 INLINE bool LVector4<NumType>::
 normalize() {
 normalize() {
   NumType l2 = length_squared();
   NumType l2 = length_squared();
-  if (l2 == 0.0) {
+  if (l2 == (NumType)0.0) {
     set(0.0, 0.0, 0.0, 0.0);
     set(0.0, 0.0, 0.0, 0.0);
     return false;
     return false;