From a5bc39679d7f78c6cc263d64355f93d6b80754da Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 1 Jul 2021 19:53:04 -0400 Subject: Formatting fix --- 2d/_collisions/polygon_polygon.html | 14 +++++++------- 2d/_collisions/polygon_polygon/snippet2.cpp | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to '2d') diff --git a/2d/_collisions/polygon_polygon.html b/2d/_collisions/polygon_polygon.html index 69938ff..9826ba4 100644 --- a/2d/_collisions/polygon_polygon.html +++ b/2d/_collisions/polygon_polygon.html @@ -290,9 +290,9 @@ }; struct Edge { - Vector2 normal; - Vector2 start; - Vector2 end; + Vector2 normal; + Vector2 start; + Vector2 end; }; struct SATResult { @@ -390,13 +390,13 @@ IntersectionResult getIntersection(ConvexPolygon* first, ConvexPolygon* second) return ir; } - ir.intersect = true; - ir.relativeVelocity = first->body.velocity - second->body.velocity; - ir.collisionNormal = sat.minOverlapEdge->normal; + ir.intersect = true; + ir.relativeVelocity = first->body.velocity - second->body.velocity; + ir.collisionNormal = sat.minOverlapEdge->normal; ir.firstPointOfApplication = sat.overlapPoint - first->body.position; ir.secondPointOfApplication = sat.overlapPoint - second->body.position;; - return ir; + return ir; }

diff --git a/2d/_collisions/polygon_polygon/snippet2.cpp b/2d/_collisions/polygon_polygon/snippet2.cpp index 8cbdcbe..a279f65 100644 --- a/2d/_collisions/polygon_polygon/snippet2.cpp +++ b/2d/_collisions/polygon_polygon/snippet2.cpp @@ -7,9 +7,9 @@ struct IntersectionResult { }; struct Edge { - Vector2 normal; - Vector2 start; - Vector2 end; + Vector2 normal; + Vector2 start; + Vector2 end; }; struct SATResult { @@ -107,11 +107,11 @@ IntersectionResult getIntersection(ConvexPolygon* first, ConvexPolygon* second) return ir; } - ir.intersect = true; - ir.relativeVelocity = first->body.velocity - second->body.velocity; - ir.collisionNormal = sat.minOverlapEdge->normal; + ir.intersect = true; + ir.relativeVelocity = first->body.velocity - second->body.velocity; + ir.collisionNormal = sat.minOverlapEdge->normal; ir.firstPointOfApplication = sat.overlapPoint - first->body.position; ir.secondPointOfApplication = sat.overlapPoint - second->body.position;; - return ir; + return ir; } -- cgit v1.2.1