Change Point2 to use STL arrays for predefined directions
This commit is contained in:
@@ -23,9 +23,9 @@ const Point2 Point2::upLeft{ -1, -1 };
|
||||
const Point2 Point2::upRight{ 1, -1 };
|
||||
const Point2 Point2::downLeft{ -1, 1 };
|
||||
const Point2 Point2::downRight{ 1, 1 };
|
||||
const Point2 Point2::directions[] = { Point2::down, Point2::downRight, Point2::right, Point2::upRight, Point2::up,
|
||||
Point2::upLeft, Point2::left, Point2::downLeft };
|
||||
const Point2 Point2::cardinalDirections[] = { Point2::down, Point2::right, Point2::up, Point2::left };
|
||||
const std::array<Point2, 8> Point2::directions = { Point2::down, Point2::downRight, Point2::right, Point2::upRight,
|
||||
Point2::up, Point2::upLeft, Point2::left, Point2::downLeft };
|
||||
const std::array<Point2, 4> Point2::cardinalDirections = { Point2::down, Point2::right, Point2::up, Point2::left };
|
||||
|
||||
Point2::Point2()
|
||||
: Point2{ 0, 0 }
|
||||
|
||||
Reference in New Issue
Block a user