Few bugs patched in spheroid.

This commit is contained in:
Rémi Oudin 2018-02-13 10:49:12 +01:00
parent e3d913fd61
commit 2a8b551355

View file

@ -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';