Changeset 9090 in orxonox.OLD for branches/presentation/src/lib/math/vector.cc
- Timestamp:
- Jul 4, 2006, 2:26:42 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/math/vector.cc
r6617 r9090 40 40 Vector Vector::getNormalized() const 41 41 { 42 float l = this->len();43 if (unlikely(l == 1.0 || l== 0.0))42 float length = this->len(); 43 if (unlikely(length == 0.0)) 44 44 return *this; 45 45 else 46 return (*this / l );46 return (*this / length); 47 47 } 48 48
Note: See TracChangeset
for help on using the changeset viewer.