Incendie
coordonnee.h
1 #pragma once
2 #ifndef COORDINATES_H
3 #define COORDINATES_H
4 
5 #include <iostream>
6 #include <cassert>
7 #include <cmath>
8 #include <algorithm>
9 
11 {
12 
13 public:
14  int col;
15  int row;
16 
17 public:
18  Coordonnee(int _x, int _y);
19  Coordonnee(const Coordonnee& other);
20  virtual bool operator==(const Coordonnee& other) const;
21 
22  // Affichage
23  std::ostream& print(std::ostream& out) const;
24  friend std::ostream& operator<<(std::ostream& out, const Coordonnee& coord)
25  { return coord.print(out); }
26 
27  // Calculs
32  unsigned manhattanDistance(const Coordonnee& other) const;
37  float euclideanDistance(const Coordonnee& other) const;
38 
39 };
40 
41 #endif // COORDINATES_H
float euclideanDistance(const Coordonnee &other) const
Definition: coordonnee.cpp:28
Normalement inutile, permet de ne pas utilise -lm lors compilation
Definition: coordonnee.h:10
unsigned manhattanDistance(const Coordonnee &other) const
Definition: coordonnee.cpp:22