]> pd.if.org Git - hexagon/commitdiff
Added HL_square
authorNathan Wagner <nw@hydaspes.if.org>
Mon, 13 Dec 2010 23:17:54 +0000 (23:17 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Mon, 13 Dec 2010 23:17:54 +0000 (23:17 +0000)
hexagon.c
hexagon.h

index 123e5cfa2539928b357a178f3bef9402c685df0f..bd07f256d18f1d30d73ce61c3b7d6a17ea9a68c1 100644 (file)
--- 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 */
index 85683b16d3d902dcd911075c166f38779af6ec07..c12614d2b591b751a6f671f8ed84daa955803b60 100644 (file)
--- 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