]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdMathOperation.cxx
#3338 BBTK Feature New Normal - MAthOperation round rint floor trunc
[bbtk.git] / packages / std / src / bbstdMathOperation.cxx
index ee22c24468cf353f5bb8429bf46f8046a796848a..a0cd94477d63a30ae6aeb77c871060245874a71d 100644 (file)
@@ -87,6 +87,11 @@ void MathOperation::Process()
     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() ) );
 }
 //===== 
 // 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)