diff options
Diffstat (limited to 'test/rigidbodytest.cpp')
-rw-r--r-- | test/rigidbodytest.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/test/rigidbodytest.cpp b/test/rigidbodytest.cpp deleted file mode 100644 index f3ad61f3..00000000 --- a/test/rigidbodytest.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* ---------------------------------------------------------------------------- - * rigidbodytest.cpp - * - * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License - * See file LICENSE for more details - * ---------------------------------------------------------------------------- - */ - -#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; - - std::cout<<"Ideal Position: "<<ideal_position<<"\n"; - - if(body.yPosition()<ideal_position*0.95 && body.yPosition()>ideal_position*1.05) - return 0; - return 1; -} |