Skip to content

Commit

Permalink
fix(geom): remove unused parameter from getAxes method
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenatlas committed Feb 2, 2024
1 parent e99d2da commit 11d20a4
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions core/src/geom/intersections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CUBOS_REFLECT_IMPL(cubos::core::geom::Intersect)
.build();

Check warning on line 16 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L12-L16

Added lines #L12 - L16 were not covered by tests
}

void getAxes(const Box& box, const glm::mat4& localToWorld, glm::vec3 axes[])
void getAxes(const glm::mat4& localToWorld, glm::vec3 axes[])

Check warning on line 19 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L19

Added line #L19 was not covered by tests
{
glm::vec3 normals[6];
cubos::core::geom::Box::normals(normals);

Check warning on line 22 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L21-L22

Added lines #L21 - L22 were not covered by tests
Expand Down Expand Up @@ -63,11 +63,7 @@ bool overlap(glm::vec2 p1, glm::vec2 p2)
{
return true;

Check warning on line 64 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L64

Added line #L64 was not covered by tests
}
if ((p2.x < p1.x) && (p1.y < p2.y))
{
return true;
}
return false;
return (p2.x < p1.x) && (p1.y < p2.y);

Check warning on line 66 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L66

Added line #L66 was not covered by tests
}

float getOverlap(glm::vec2 p1, glm::vec2 p2)

Check warning on line 69 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L69

Added line #L69 was not covered by tests
Expand All @@ -80,7 +76,7 @@ float getOverlap(glm::vec2 p1, glm::vec2 p2)
}
return glm::abs(p1.y - p1.x);

Check warning on line 77 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L77

Added line #L77 was not covered by tests
}
else if (p1.x < p2.x)
if (p1.x < p2.x)

Check warning on line 79 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L79

Added line #L79 was not covered by tests
{
if (p1.y < p2.y)

Check warning on line 81 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L81

Added line #L81 was not covered by tests
{
Expand All @@ -96,8 +92,8 @@ bool cubos::core::geom::intersects(const Box& box1, const glm::mat4& localToWorl
{
static glm::vec3 axes1[6];
static glm::vec3 axes2[6];
getAxes(box1, localToWorld1, axes1);
getAxes(box2, localToWorld2, axes2);
getAxes(localToWorld1, axes1);
getAxes(localToWorld2, axes2);

Check warning on line 96 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L95-L96

Added lines #L95 - L96 were not covered by tests

for (glm::vec3 axis : axes1)

Check warning on line 98 in core/src/geom/intersections.cpp

View check run for this annotation

Codecov / codecov/patch

core/src/geom/intersections.cpp#L98

Added line #L98 was not covered by tests
{
Expand Down

0 comments on commit 11d20a4

Please sign in to comment.