Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages Search
rectcoord.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef RECTCOORD_H
00019 #define RECTCOORD_H
00020
00021 #define PI 3.141592653589
00022
00023 class PolarCoord;
00024
00029 class RectCoord
00030 {
00031 public:
00032 static const int RADIANS = 0;
00033 static const int DEGREES = 1;
00034
00035 RectCoord(double x=0,double y=0);
00036 PolarCoord toPolar(int mode=RADIANS, bool bearing=true);
00037 inline double getX() const{return x;}
00038 inline double getY() const{return y;}
00039
00040 private:
00041 double x,y;
00042 };
00043
00044 #endif
|