Changeset 10383 for trunk/psLib
- Timestamp:
- Dec 1, 2006, 12:10:25 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psEllipse.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psEllipse.c
r10254 r10383 14 14 moments.x2 = +0.5*f1 + 0.5*f2*cos(2*axes.theta); 15 15 moments.y2 = +0.5*f1 - 0.5*f2*cos(2*axes.theta); 16 moments.xy = -0.5*f2*sin(2*axes.theta);16 moments.xy = +0.5*f2*sin(2*axes.theta); 17 17 18 18 assert (isfinite(moments.x2)); … … 33 33 34 34 axes.major = sqrt (0.5*(g1 + g3)); 35 axes.theta = 0.5 * atan2 (-2.0*moments.xy, g2); // theta in radians35 axes.theta = +0.5 * atan2 (+2.0*moments.xy, g2); // theta in radians 36 36 37 37 // long, thin objects are likely to have a poorly measured minor axis … … 84 84 85 85 axes.minor = sqrt (2.0 / (f1 + f3)); 86 axes.theta = 0.5 * atan2 (-2.0*shape.sxy, f2);86 axes.theta = -0.5 * atan2 (+2.0*shape.sxy, f2); 87 87 88 88 // long, thin objects are likely to have a poorly measured major axis
Note:
See TracChangeset
for help on using the changeset viewer.
