Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: lib/src/collision/shapes/polygon_shape.dart

Issue 1138063003: pkg/box2d: 0.2.0 release (Closed) Base URL: https://github.com/google/dbox2d.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/collision/shapes/circle_shape.dart ('k') | lib/src/dynamics/contacts/contact.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « lib/src/collision/shapes/circle_shape.dart ('k') | lib/src/dynamics/contacts/contact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698