IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9774


Ignore:
Timestamp:
Oct 29, 2006, 5:02:26 PM (20 years ago)
Author:
magnier
Message:

fixed formulae of Shape to Axes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psEllipse.c

    r9773 r9774  
    4545    double f1 = 1.0 / PS_SQR(shape.sx) + 1.0 / PS_SQR(shape.sy);
    4646    double f2 = 1.0 / PS_SQR(shape.sx) - 1.0 / PS_SQR(shape.sy);
    47     double f3 = PS_SQR(f2) + 4*PS_SQR(shape.sxy);
     47    double f3 = sqrt(PS_SQR(f2) + 4*PS_SQR(shape.sxy));
    4848
    49     axes.theta = 0.5 * atan2 (-2.0*shape.sxy, f2) / 2.0;
     49    axes.theta = 0.5 * atan2 (2*shape.sxy, f2);
    5050    axes.major = sqrt (2.0 / (f1 - f3));
    5151    axes.minor = sqrt (2.0 / (f1 + f3));
Note: See TracChangeset for help on using the changeset viewer.