NXPCup_Cachan / Mbed 2 deprecated NXPCup

Dependencies:   mbed

Classes/Vector.h

Committer:
Wael_H
Date:
2020-02-11
Revision:
0:8743b606abc3
Child:
2:1103f5d61035

File content as of revision 0:8743b606abc3:

#ifndef VECTOR_H
#define VECTOR_H

typedef struct
{
    int x;
    int y;
}Point;

class Vector
{
public:
    Vector(int x0, int y0, int x1, int y1);
    Vector(Point p0, Point p1);
    Vector();
    void orienteVersLeHaut(); // fct qui met la pointe du Vector (p1) vers le haut (dans une console (y inversés donc)) 
    float getCoeffDir() const;
    int getNorme() const;
    bool estADroiteDe(Vector& v) const;
    static Vector getVectorAuMilieuDe(Vector& v0, Vector& v1);
    
private:
    Point p0, p1;
};

#endif // VECTOR_H