summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-07-01 19:53:04 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-07-01 19:53:04 -0400
commita5bc39679d7f78c6cc263d64355f93d6b80754da (patch)
treeca1d173a449f667e70e5bb4754166f0444e3d462
parent4878f0fc6a039d220dd7adecb18d19c688ae50b0 (diff)
Formatting fix
-rw-r--r--2d/_collisions/polygon_polygon.html14
-rw-r--r--2d/_collisions/polygon_polygon/snippet2.cpp14
2 files changed, 14 insertions, 14 deletions
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 @@
};
<span class="code_keyword">struct</span> Edge {
- <span class="code_keyword">Vector2</span> normal;
- <span class="code_keyword">Vector2</span> start;
- <span class="code_keyword">Vector2</span> end;
+ <span class="code_keyword">Vector2</span> normal;
+ <span class="code_keyword">Vector2</span> start;
+ <span class="code_keyword">Vector2</span> end;
};
<span class="code_keyword">struct</span> SATResult {
@@ -390,13 +390,13 @@ IntersectionResult getIntersection(ConvexPolygon* first, ConvexPolygon* second)
<span class="code_keyword">return</span> 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;;
- <span class="code_keyword">return</span> ir;
+ <span class="code_keyword">return</span> ir;
}
</code></pre> </p>
</section>
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;
}