From ca7198be26f8b84d708dffbe2a946ad5846cd10e Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Mon, 13 Dec 2010 23:17:54 +0000 Subject: [PATCH] Added HL_square --- hexagon.c | 4 ++++ hexagon.h | 1 + 2 files changed, 5 insertions(+) diff --git a/hexagon.c b/hexagon.c index 123e5cf..bd07f25 100644 --- a/hexagon.c +++ b/hexagon.c @@ -42,6 +42,10 @@ float HL_fanf[16] = { .577350269189625764509148780502f, 0.0f }; +/* size of a square that will exactly fit in a hexagon */ +/* 2.0/(1+sqrt(3.0)) */ +double HL_square = .73205080756887729352; + /* these all are for a hex one unit across */ static double hexptvd[6][2] = { {.577350269189625764509148780502, 0.0}, /* 1.0/sqrt3 */ diff --git a/hexagon.h b/hexagon.h index 85683b1..c12614d 100644 --- a/hexagon.h +++ b/hexagon.h @@ -144,5 +144,6 @@ struct HL_astar *HL_astar_init(struct HL_astar *s); extern double HL_fand[16]; extern float HL_fanf[16]; +extern double HL_square; #endif -- 2.40.0