IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 11, 2005, 12:02:16 PM (21 years ago)
Author:
desonia
Message:

changed PS_PI* to M_PI*.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psCoord.c

    r3715 r3884  
    1010*  @author GLG, MHPCC
    1111*
    12 *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2005-04-19 05:46:24 $
     12*  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2005-05-11 22:02:15 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    326326{
    327327    while (angle < FLT_EPSILON) {
    328         angle+=PS_PI*2;
    329     }
    330 
    331     while (angle >= (PS_PI*2)) {
    332         angle-=PS_PI*2;
     328        angle+=M_PI*2;
     329    }
     330
     331    while (angle >= (M_PI*2)) {
     332        angle-=M_PI*2;
    333333    }
    334334    return(angle);
     
    509509    } else if ( projection->type == PS_PROJ_PAR) {
    510510        out->x = phi*(2.0*cos(2.0*theta/3.0) - 1.0);
    511         out->y = PS_PI*sin(theta/3.0);
     511        out->y = M_PI*sin(theta/3.0);
    512512    } else {
    513513        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
     
    558558        // Parabolic deprojection
    559559    } else if ( projection->type == PS_PROJ_PAR) {
    560         psF64 rho = y/PS_PI;
     560        psF64 rho = y/M_PI;
    561561        phi = x/(1.0 - 4.0*rho*rho);
    562562        theta = 3.0*asin(rho);
     
    647647        // Wrap these to an acceptable range.  This assumes that all
    648648        // angles are in radians.
    649         tmp->r = fmod(tmp->r, 2*PS_PI);
    650         tmp->d = fmod(tmp->d, 2*PS_PI);
     649        tmp->r = fmod(tmp->r, 2*M_PI);
     650        tmp->d = fmod(tmp->d, 2*M_PI);
    651651        tmp->rErr = 0.0;
    652652        tmp->dErr = 0.0;
     
    760760        // Add offset and wrap to 0 to 2PI if necessary
    761761        tmp->r = position->r + tmpR;
    762         tmp->r = fmod(tmp->r, 2.0*PS_PI);
     762        tmp->r = fmod(tmp->r, 2.0*M_PI);
    763763        tmp->d = position->d + tmpD;
    764         tmp->d = fmod(tmp->d, 2.0*PS_PI);
     764        tmp->d = fmod(tmp->d, 2.0*M_PI);
    765765        tmp->rErr = 0.0;
    766766        tmp->dErr = 0.0;
Note: See TracChangeset for help on using the changeset viewer.