#include "hexagon.h" #include "ctap.h" int main(void) { double px, py; struct HL_hex h; plan(8); px = 0.444194; py = -4.639363; h = HL_hexbin(1.0, px, py); is_int(1, h.x, "hexbin x %f, %f", px, py); is_int(4, h.y, "hexbin x %f, %f", px, py); px = 0.0; py = 0.0; h = HL_hexbin(1.0, px, py); is_int(0, h.x, "hexbin x %f, %f", px, py); is_int(0, h.y, "hexbin x %f, %f", px, py); px = 0.288675; py = 0.5; h = HL_hexbin(0.111111, px, py); is_int(3, h.x, "center hexbin x %f, %f", px, py); is_int(-5, h.y, "center hexbin x %f, %f", px, py); px = 0.866025; py = 0.5; h = HL_hexbin(0.1111111, px, py); is_int(9, h.x, "vertex hexbin x %f, %f", px, py); is_int(-5, h.y, "vertex hexbin y %f, %f", px, py); return 0; }