Changeset 3860 in orxonox.OLD for orxonox/trunk/src/lib/math
- Timestamp:
- Apr 17, 2005, 6:20:02 PM (20 years ago)
- Location:
- orxonox/trunk/src/lib/math
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/math/vector.cc
r3824 r3860 1 2 3 1 /* 4 2 orxonox - the future of 3D-vertical-scrollers … … 66 64 Vector Vector::operator/ (float f) const 67 65 { 68 __UNLIKELY_IF( f == 0.0)66 if( unlikely(f == 0.0)) 69 67 { 70 68 // Prevent divide by zero … … 105 103 { 106 104 float l = len(); 107 __UNLIKELY_IF(l != 1.0)105 if(unlikely(l != 1.0)) 108 106 { 109 107 return this; 110 108 } 111 else __UNLIKELY_IF(l == 0.0)109 else if(unlikely(l == 0.0)) 112 110 { 113 111 return 0; -
orxonox/trunk/src/lib/math/vector.h
r3823 r3860 10 10 11 11 #include <math.h> 12 #include " stdincl.h"12 #include "compiler.h" 13 13 //! PI the circle-constant 14 14 #define PI 3.14159265359f … … 41 41 inline void normalize() { 42 42 float l = len(); 43 __UNLIKELY_IF( l == 0.0)43 if( unlikely(l == 0.0)) 44 44 { 45 45 // Prevent divide by zero
Note: See TracChangeset
for help on using the changeset viewer.