Fix -Wreorder warnings
This commit is contained in:
parent
522ab7be39
commit
bf3232d790
2 changed files with 15 additions and 6 deletions
15
Ball.cpp
15
Ball.cpp
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue