-
Notifications
You must be signed in to change notification settings - Fork 1
/
town.h
26 lines (17 loc) · 575 Bytes
/
town.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef TOWN_H_
#define TOWN_H_
//definition du type opaque
typedef struct Town_t Town;
//cree une ville de nom "name", et de coordonnées (x,y)
Town *createTown(const char *name, double x, double y);
//renvoie la coordonnée x de la ville
double getTownX(Town *town);
//renvoie la coordonnée y de la ville
double getTownY(Town *town);
//renvoie le nom de town
const char *getTownName(Town *town);
//renvoie la distance eucliedienne entre 2 villes
double distanceBetweenTowns(Town *town1, Town *town2);
//libere la memoire de town
void freeTown(Town *town);
#endif