]> pd.if.org Git - isea/blob - hex.h
Initial checkin.
[isea] / hex.h
1 #ifndef HEX_H_
2 #define HEX_H_ 1
3
4 struct hex {
5         int iso;
6         int x, y, z;
7 };
8
9 int hexbin2(int horizontal, double width, double x, double y,
10                 int *i, int *j);
11
12 int hexbin(int horizontal, double width, double x, double y,
13                 int *i, int *j);
14 int hex_xy(struct hex *h);
15 int hex_iso(struct hex *h);
16
17 int hex_distance(struct hex *a, struct hex *b);
18 int hex_bearing(struct hex *a, struct hex *b);
19 int hex_at(struct hex *h, int distance, struct hex **list);
20 int hex_within(struct hex *h, int distance, struct hex **list);
21 int hex_dir(struct hex *h, int direction);
22
23 #endif