pmc/include/vector.hpp
changeset 65 76514757b0d6
equal deleted inserted replaced
64:993b97c4ad2d 65:76514757b0d6
       
     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.hpp>
       
    10 
       
    11 namespace algebra {
       
    12     class Vector:public Object {
       
    13       public:
       
    14         enum Mode { DEG, RAD, GRAD };
       
    15 
       
    16         Vector (int xx = 0, int yy = 0);
       
    17         Vector (const Vector &);
       
    18         virtual ~ Vector ();
       
    19 
       
    20         int X ();
       
    21         int Y ();
       
    22 
       
    23         Vector operator+ (Vector &);
       
    24         Vector operator- (Vector &);
       
    25         double abs ();
       
    26 
       
    27         void vector ();
       
    28         double angle (Vector &);
       
    29         void setMode (Mode m = RAD);
       
    30 
       
    31       private:
       
    32         Mode mode;
       
    33 
       
    34         int x;
       
    35         int y;
       
    36     };
       
    37 }
       
    38 #endif