changeset 4029:5160e1bdeff2 libavcodec

mod()
author michael
date Mon, 16 Oct 2006 15:01:12 +0000
parents fe5e26898887
children ffe1b004ecc7
files eval.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/eval.c	Mon Oct 16 12:52:21 2006 +0000
+++ b/eval.c	Mon Oct 16 15:01:12 2006 +0000
@@ -175,6 +175,7 @@
     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;