From 6e280dfc042efdc54f78a843b48ca8cfa33c5bb5 Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Sun, 15 Sep 2019 13:40:00 -0700 Subject: [PATCH] fix invalid polygon definition --- content/shapes/polygon.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/shapes/polygon.md b/content/shapes/polygon.md index e35f628..0ce70d9 100644 --- a/content/shapes/polygon.md +++ b/content/shapes/polygon.md @@ -8,12 +8,12 @@ To define a polygon, pass a variable number of **Position2D** structs representi ```cs var polygon = new Polygon( - new Position2D(0, 0), - new Position2D(-1, -1), - new Position2D(1, -1), - new Position2D(1, 1), - new Position2D(-1, 1) + new Position2D(-2, 0), + new Position2D(0, 2), + new Position2D(2, 0), ); ``` +This polygon, for example, is a triangle. + Be careful not to define a concave Polygon, as this will cause the results of collision detection to be incorrect. \ No newline at end of file