use #define for HexTile

This commit is contained in:
josh committed 2012-09-09 23:56:00 -04:00
1 parent 19b3a79f33
commit 433d702096
2 files changed
+8 -6

No files matched your search

+6 -6
View File
@@ -6,12 +6,12 @@
/* points of a horizontal hexagon 2.0 units high */
static const float hex_points[][2] = {
{1.1547005383792517, 0.0},
{0.577350269189626, 1.0},
{-0.5773502691896256, 1.0},
{-1.1547005383792517, 0.0},
{-0.5773502691896264, -1.0},
{0.577350269189626, -1.0}
{HEX_WIDTH_TO_HEIGHT, 0.0},
{HEX_WIDTH_TO_HEIGHT / 2.0, 1.0},
{-HEX_WIDTH_TO_HEIGHT / 2.0, 1.0},
{-HEX_WIDTH_TO_HEIGHT, 0.0},
{-HEX_WIDTH_TO_HEIGHT / 2.0, -1.0},
{HEX_WIDTH_TO_HEIGHT / 2.0, -1.0}
};
HexTile::HexTile(float x, float y, float size)
+2
View File
@@ -2,6 +2,8 @@
#ifndef HEXTILE_H
#define HEXTILE_H
#define HEX_WIDTH_TO_HEIGHT 1.1547005383792517
class HexTile
{
public: