X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fstd%2Fsrc%2FbbstdMathOperation.cxx;h=3ab9e6f9335001ce75385caf1f8978024a0ea60f;hb=83ab568865c75a1064fbd485997ff98b78d5195d;hp=fdedc101c8e7997c6978e0a25f7193d024df4e3a;hpb=433d792763e9cebb963243fbd49fff719f69ed4a;p=bbtk.git diff --git a/packages/std/src/bbstdMathOperation.cxx b/packages/std/src/bbstdMathOperation.cxx index fdedc10..3ab9e6f 100644 --- a/packages/std/src/bbstdMathOperation.cxx +++ b/packages/std/src/bbstdMathOperation.cxx @@ -85,6 +85,14 @@ void MathOperation::Process() if (bbGetInputType()==17) bbSetOutputOut( std::max( bbGetInputIn1(),bbGetInputIn2() ) ); if (bbGetInputType()==18) bbSetOutputOut( fabs( bbGetInputIn1() ) ); if (bbGetInputType()==19) bbSetOutputOut( (int)bbGetInputIn1() % (int)bbGetInputIn2() ); + if (bbGetInputType()==20) if (bbGetInputIn1()<(int)bbGetInputIn2()) { bbSetOutputOut(1); } else { bbSetOutputOut(0); } ; + if (bbGetInputType()==21) if (bbGetInputIn1()>(int)bbGetInputIn2()) { bbSetOutputOut(1); } else { bbSetOutputOut(0); } ; + if (bbGetInputType()==22) bbSetOutputOut( round( bbGetInputIn1() ) ); + if (bbGetInputType()==23) bbSetOutputOut( rint( bbGetInputIn1() ) ); + if (bbGetInputType()==24) bbSetOutputOut( floor( bbGetInputIn1() ) ); + if (bbGetInputType()==25) bbSetOutputOut( ceil( bbGetInputIn1() ) ); + if (bbGetInputType()==26) bbSetOutputOut( trunc( bbGetInputIn1() ) ); + if (bbGetInputType()==30) if (bbGetInputIn1()==(int)bbGetInputIn2()) { bbSetOutputOut(1); } else { bbSetOutputOut(0); } ; } //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)