Changeset 1393 for trunk/MagicSoft/Cosy


Ignore:
Timestamp:
07/10/02 08:27:36 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Changelog

    r1343 r1393  
    11                                                                  -*-*- END -*-*-
     2
     3 2002/07/10 - Thomas Bretz:
     4
     5   * base/coord.h:
     6     - added some member functions
     7
     8   * main/MBending.[h,cc]:
     9     - added
     10
     11
    212
    313 2002/06/03 - Thomas Bretz:
  • trunk/MagicSoft/Cosy/base/coord.h

    r1273 r1393  
    33
    44#include <math.h>          // floor
     5#include <fstream.h>
    56
    67/* pi/180:  degrees to radians */
     
    3435class XY
    3536{
     37    friend ifstream& operator>>(ifstream &in, XY &xy);
     38    friend ofstream& operator<<(ofstream &in, XY &xy);
     39
    3640protected:
    3741    double fX;
     
    4650    double X() const { return fX; }
    4751    double Y() const { return fY; }
     52
     53    void X(double x) { fX=x; }
     54    void Y(double y) { fY=y; }
    4855
    4956    void operator/=(double c) { fX/=c; fY/=c; }
     
    6471};
    6572
     73inline ifstream& operator>>(ifstream &in,  XY &xy) { in  >> xy.fX; in  >> xy.fY; return in; }
     74inline ofstream& operator<<(ofstream &out, XY &xy) { out << xy.fX << " " << xy.fY; return out; }
     75
    6676class AltAz : public XY
    6777{
     
    7282    double Az()  const { return fY; }
    7383
     84    void operator*=(double c) { fX*=c; fY*=c; }
     85    void operator/=(double c) { fX*=c; fY*=c; }
     86
    7487    void Alt(double d) { fX=d; }
    7588    void Az(double d)  { fY=d; }
    7689    void operator*=(const XY &c)    { fX*=c.X(); fY*=c.Y(); }
    7790    void operator-=(const AltAz &c) { fX-=c.fX; fY-=c.fY; }
     91    void operator+=(const AltAz &c) { fX+=c.fX; fY+=c.fY; }
    7892
    7993    AltAz operator/(double c) const { return AltAz(fX/c, fY/c); }
     
    91105    ZdAz(double zd=0, double az=0) : XY(zd, az) {}
    92106    ZdAz(const ZdAz &c) : XY(c) {}
     107
     108    void operator*=(double c) { fX*=c; fY*=c; }
     109    void operator/=(double c) { fX*=c; fY*=c; }
    93110
    94111    double Zd() const { return fX; }
     
    118135    double Dec() const { return fY; }
    119136
     137    void operator*=(double c) { fX*=c; fY*=c; }
     138    void operator/=(double c) { fX*=c; fY*=c; }
     139
    120140    void Ra(double x)  { fX = x; }
    121141    void Dec(double y) { fY = y; }
  • trunk/MagicSoft/Cosy/main/MainLinkDef.h

    r1111 r1393  
    77#pragma link C++ class MCosy;
    88
     9#pragma link C++ class MBending;
     10
    911#endif
  • trunk/MagicSoft/Cosy/main/Makefile

    r1111 r1393  
    3333
    3434SRCFILES = MCosy.cc \
     35           MBending.cc
    3536           MStarguider.cc
    3637
Note: See TracChangeset for help on using the changeset viewer.