Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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