Fix -Wreorder warnings

This commit is contained in:
Rémi Oudin 2018-02-07 15:18:53 +01:00
parent 522ab7be39
commit bf3232d790
2 changed files with 15 additions and 6 deletions

View file

@ -1,9 +1,18 @@
#include "Ball.hpp"
#include <cmath>
Ball::Ball(Point& _center, double _p, double _q) : Center(_center),
init_h(_center.z), bounce_number(0), crt_time(0), T(0), A(_center.z), B(0),
U(sqrt(2 * G_CTE * _center.z)), surface(_center, _p, _q) {}
Ball::Ball(Point& _center, double _p, double _q) :
Center(_center),
surface(_center, _p, _q),
init_h(_center.z),
bounce_number(0),
crt_time(0),
A(_center.z),
B(0),
U(sqrt(2 * G_CTE * _center.z)),
T(0)
{
}
void Ball::_compute_pos() {
Center.x = A + B * crt_time - (G_CTE / 2) * crt_time * crt_time;

View file

@ -28,9 +28,9 @@ class Spheroid : public ImplicitSurface {
* V is the volume. Extremely useful to have a constant volume in the
* ball
**/
size_t stiffness;
double p, q;
double V;
Point& center;
double p, q;
size_t stiffness;
double V;
void _compute_volume();
};