diff --git a/spheroid.cpp b/spheroid.cpp index 60b2d94..bd2c9b2 100644 --- a/spheroid.cpp +++ b/spheroid.cpp @@ -13,7 +13,7 @@ Spheroid::Spheroid(const Point& _center, double _min_p, double _p, double _q) : } void Spheroid::_compute_volume() { - V = (4/3) * PI * p * q * q; + V = (4./3.) * PI * p * q * q; } @@ -32,7 +32,7 @@ void Spheroid::update_center_pos(Point& _center) { } void Spheroid::check_horizontal_plan_collision(double height) { - if (((center.y - p) <= height) || (p <= init_p)) { + if (((center.y - p) <= height) || (p < init_p)) { p = fmin(init_p, center.y-height); update_radius(); std::cout << "p:" << p << "q:" << q << '\n';