Changeset 9110 in orxonox.OLD for trunk/src/lib/math/vector.cc
- Timestamp:
- Jul 4, 2006, 11:18:41 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/math/vector.cc
r6617 r9110 29 29 #endif 30 30 31 using namespace std;32 31 33 32 ///////////// … … 40 39 Vector Vector::getNormalized() const 41 40 { 42 float l = this->len();43 if (unlikely(l == 1.0 || l== 0.0))41 float length = this->len(); 42 if (unlikely(length == 0.0)) 44 43 return *this; 45 44 else 46 return (*this / l );45 return (*this / length); 47 46 } 48 47
Note: See TracChangeset
for help on using the changeset viewer.