- Timestamp:
- Oct 24, 2012, 3:53:46 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120905/psModules
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
src/objects (modified) (1 prop)
-
src/objects/pmSourceOutputs.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120905/psModules
- Property svn:mergeinfo changed
/trunk/psModules merged: 34496-34499,34514-34515,34527,34530,34541,34564
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/psModules/src/objects
- Property svn:mergeinfo deleted
-
branches/eam_branches/ipp-20120905/psModules/src/objects/pmSourceOutputs.c
r34403 r34568 227 227 *pltScale = 0.5*(pltScale_x + pltScale_y); 228 228 229 float posAngle_x, posAngle_y; 229 230 float crossProduct = dTPx_dCHx * dTPy_dCHy - dTPx_dCHy * dTPy_dCHx; 230 231 if (crossProduct > 0.) { 231 232 *pltScale *= -1.0; 232 } 233 234 float posAngle_x = atan2 (+dTPy_dCHx, +dTPx_dCHx); 235 float posAngle_y = atan2 (-dTPy_dCHy, +dTPx_dCHy); 233 posAngle_x = atan2 (dTPy_dCHx, dTPx_dCHx); 234 posAngle_y = atan2 (dTPy_dCHy, dTPx_dCHy) - M_PI_2; 235 } else { 236 posAngle_x = atan2 (dTPy_dCHx, -dTPx_dCHx); 237 posAngle_y = atan2 (dTPy_dCHy, dTPx_dCHy) - M_PI_2; 238 } 239 240 // with errors, these may end up on opposite sides of the M_PI boundary. 241 if (posAngle_x - posAngle_y > M_PI) { 242 posAngle_y += 2.0 * M_PI; 243 } 244 if (posAngle_y - posAngle_x > M_PI) { 245 posAngle_x += 2.0 * M_PI; 246 } 236 247 *posAngle = 0.5*(posAngle_x + posAngle_y); 237 248
Note:
See TracChangeset
for help on using the changeset viewer.
