]> git.sesse.net Git - ffmpeg/commitdiff
mod()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Oct 2006 15:01:12 +0000 (15:01 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Oct 2006 15:01:12 +0000 (15:01 +0000)
Originally committed as revision 6710 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/eval.c

index 93318ce63b8ce753a523587218c8e3a1cc02065c..35147a7d0c7e930e3d576fdf6dfa888d196d8be2 100644 (file)
@@ -175,6 +175,7 @@ static double evalPrimary(Parser *p){
     else if( strmatch(next, "squish") ) d= 1/(1+exp(4*d));
     else if( strmatch(next, "gauss" ) ) d= exp(-d*d/2)/sqrt(2*M_PI);
     else if( strmatch(next, "abs"   ) ) d= fabs(d);
+    else if( strmatch(next, "mod"   ) ) d-= floor(d/d2)*d2;
     else if( strmatch(next, "max"   ) ) d= d >  d2 ?   d : d2;
     else if( strmatch(next, "min"   ) ) d= d <  d2 ?   d : d2;
     else if( strmatch(next, "gt"    ) ) d= d >  d2 ? 1.0 : 0.0;