blob: b898a1b4753b4b69f7dae41cb6734440e911e168 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include "Physics/particlebody.hpp"
#include <iostream>
int main(int, char**)
{
yage::ParticleBody body;
for(int i=0; i<60*3; ++i)
{
body.update();
std::cout<<"position: "<<body.xPosition()<<", "<<body.yPosition()<<"\n";
}
double ideal_position=0.5*9.81*3*3;
if(body.yPosition()>ideal_position*0.95 && body.yPosition()<ideal_position*1.05)
return 0;
return 1;
}
|