pmc/include/vector.h
changeset 42 83b8151b966d
child 43 cf8c1b5127b2
equal deleted inserted replaced
41:574503cf7bb0 42:83b8151b966d
       
     1 /**
       
     2  * test/demos/pmc/include/vector.h
       
     3  * Copyright (C) 2008 Markus Broeker
       
     4  */
       
     5 
       
     6 #ifndef VECTOR_H
       
     7 #define VECTOR_H
       
     8 
       
     9 #include <object.h>
       
    10 
       
    11 class Vector:public Object {
       
    12   public:
       
    13     enum Mode { DEG, RAD, GRAD };
       
    14 
       
    15     Vector (int xx = 0, int yy = 0);
       
    16     virtual ~ Vector ();
       
    17 
       
    18     int X ();
       
    19     int Y ();
       
    20 
       
    21     Vector operator+ (Vector);
       
    22     Vector operator- (Vector);
       
    23     double abs ();
       
    24 
       
    25     void vector ();
       
    26     double angle (Vector);
       
    27     void setMode (Mode m = RAD);
       
    28 
       
    29   private:
       
    30     Mode mode;
       
    31     int x;
       
    32     int y;
       
    33 };
       
    34 #endif