Skip to content

Commit

Permalink
[collision-query] Fix clang-tidy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmNotHanni committed Apr 12, 2023
1 parent 810f589 commit cd73c2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vulkan-renderer/world/collision_query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bool ray_box_collision(const std::array<glm::vec3, 2> &box_bounds, const glm::ve
float tzmin{(box_bounds[sign[2]].z - position.z) * inverse_dir.z};
float tzmax{(box_bounds[1 - sign[2]].z - position.z) * inverse_dir.z};

return !((tmin > tzmax) || (tzmin > tmax));
return ((tmin <= tzmax) && (tzmin <= tmax));
}

std::optional<RayCubeCollision<Cube>> ray_cube_collision_check(const Cube &cube, const glm::vec3 pos,
Expand Down

0 comments on commit cd73c2c

Please sign in to comment.