Changeset 6387 for code/branches/presentation2/src/libraries/util/Math.cc
- Timestamp:
- Dec 21, 2009, 1:18:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/util/Math.cc
r6137 r6387 138 138 return orxonox::Vector2(0, 1); 139 139 } 140 140 141 141 float cos_value = clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1); 142 142 float sin_value = sqrt( 1 - cos_value*cos_value ); 143 143 144 144 if ((mydirection.crossProduct(myorthonormal)).dotProduct(distance) > 0) 145 145 return orxonox::Vector2( sin_value, cos_value ); … … 179 179 } 180 180 //float angle = acos(clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1)); 181 181 182 182 float cos_value = clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1); 183 183 float sin_value = sqrt( 1 - cos_value*cos_value );
Note: See TracChangeset
for help on using the changeset viewer.