| Index: lib/src/collision/shapes/polygon_shape.dart
|
| diff --git a/lib/src/collision/shapes/polygon_shape.dart b/lib/src/collision/shapes/polygon_shape.dart
|
| index d52aeca3bdf069e407d33d8d5b50c87b0a90dd1d..650b8d1575299372169a105a571a7e5f3acdd224 100644
|
| --- a/lib/src/collision/shapes/polygon_shape.dart
|
| +++ b/lib/src/collision/shapes/polygon_shape.dart
|
| @@ -41,15 +41,13 @@ class PolygonShape extends Shape {
|
| * The vertices of the shape. Note: use getVertexCount(), not _vertices.length, to get number of
|
| * active vertices.
|
| */
|
| - final List<Vector2> vertices =
|
| - new List<Vector2>(Settings.maxPolygonVertices);
|
| + final List<Vector2> vertices = new List<Vector2>(Settings.maxPolygonVertices);
|
|
|
| /**
|
| * The normals of the shape. Note: use getVertexCount(), not _normals.length, to get number of
|
| * active normals.
|
| */
|
| - final List<Vector2> normals =
|
| - new List<Vector2>(Settings.maxPolygonVertices);
|
| + final List<Vector2> normals = new List<Vector2>(Settings.maxPolygonVertices);
|
|
|
| /**
|
| * Number of active vertices in the shape.
|
| @@ -596,10 +594,7 @@ class PolygonShape extends Shape {
|
| for (int i = 0; i < count; ++i) {
|
| // Triangle vertices.
|
| e1.setFrom(vertices[i]).sub(s);
|
| - e2
|
| - .setFrom(s)
|
| - .negate()
|
| - .add(i + 1 < count ? vertices[i + 1] : vertices[0]);
|
| + e2.setFrom(s).negate().add(i + 1 < count ? vertices[i + 1] : vertices[0]);
|
|
|
| final double D = e1.cross(e2);
|
|
|
|
|