Changeset 6412 for code/branches/pickup2/src/libraries/util/Math.cc
- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/libraries/util/Math.cc
r5738 r6412 43 43 namespace orxonox 44 44 { 45 #if OGRE_VERSION < 0x010603 45 46 /** 46 47 @brief Function for writing a Radian to a stream. … … 51 52 return out; 52 53 } 54 55 /** 56 @brief Function for writing a Degree to a stream. 57 */ 58 std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree) 59 { 60 out << degree.valueDegrees(); 61 return out; 62 } 63 #endif 53 64 54 65 /** … … 61 72 radian = temp; 62 73 return in; 63 }64 65 /**66 @brief Function for writing a Degree to a stream.67 */68 std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree)69 {70 out << degree.valueDegrees();71 return out;72 74 } 73 75 … … 136 138 return orxonox::Vector2(0, 1); 137 139 } 138 140 139 141 float cos_value = clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1); 140 142 float sin_value = sqrt( 1 - cos_value*cos_value ); 141 143 142 144 if ((mydirection.crossProduct(myorthonormal)).dotProduct(distance) > 0) 143 145 return orxonox::Vector2( sin_value, cos_value ); … … 177 179 } 178 180 //float angle = acos(clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1)); 179 181 180 182 float cos_value = clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1); 181 183 float sin_value = sqrt( 1 - cos_value*cos_value );
Note: See TracChangeset
for help on using the changeset viewer.