Skip to content

Commit

Permalink
shapes: Fixed SpheroCylinder outside condition. (#3629)
Browse files Browse the repository at this point in the history
There is obviously a test missing, but I *think* this is what is actually intended.
  • Loading branch information
kodiakhq[bot] authored Apr 4, 2020
2 parents b2836bd + 659b2bf commit eba788a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shapes/src/SpheroCylinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void SpheroCylinder::calculate_dist(const Utils::Vector3d &pos, double &dist,

if (r >= m_rad ||
(z_abs >= m_half_length &&
std::sqrt(r * r + std::pow(z_abs - m_half_length, 2))) > m_rad) {
std::sqrt(r * r + std::pow(z_abs - m_half_length, 2)) > m_rad)) {
/* Outside */
if (z_abs >= m_half_length) {
/* Closest feature: hemisphere */
Expand Down

0 comments on commit eba788a

Please sign in to comment.