X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FBilatTools_CPP%2Fsrc%2Fcore%2Ftools%2Fcpp%2FVariateurF.cpp;fp=WCudaMSE%2FBilatTools_CPP%2Fsrc%2Fcore%2Ftools%2Fcpp%2FVariateurF.cpp;h=8181794d832928b65ff3aed7ff491b643a02bb05;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/BilatTools_CPP/src/core/tools/cpp/VariateurF.cpp b/WCudaMSE/BilatTools_CPP/src/core/tools/cpp/VariateurF.cpp new file mode 100755 index 0000000..8181794 --- /dev/null +++ b/WCudaMSE/BilatTools_CPP/src/core/tools/cpp/VariateurF.cpp @@ -0,0 +1,89 @@ +#include "VariateurF.h" +#include + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +/*--------------------------------------*\ + |* Private *| + \*-------------------------------------*/ + +/*----------------------------------------------------------------------*\ + |* Implementation *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +VariateurF::VariateurF(const IntervalF& range, float dt) + { + this->dt = dt; + this->tMin = range.a; + this->tMax =range.b; + + // Tools + this->isCroisssantPhase = true; + this->t =range.a; + + assert(tMin= tMax) + { + isCroisssantPhase = false; + t -= dt; + } + else + { + t += dt; + } + } + else + { + if (t <= tMin) + { + isCroisssantPhase = true; + t += dt; + } + else + { + t -= dt; + } + } + + return t; + } + +double VariateurF::get() + { + return t; + } + +/*--------------------------------------*\ + |* Private *| + \*-------------------------------------*/ + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/ +