Replaced my noble-prize worthy "float modulo" implementation with fmodf().
authorAlexander Ewering <blender@instinctive.de>
Tue, 8 Nov 2005 12:53:36 +0000 (12:53 +0000)
committerAlexander Ewering <blender@instinctive.de>
Tue, 8 Nov 2005 12:53:36 +0000 (12:53 +0000)
source/blender/src/sequence.c

index 18db513c4720198c0b968cf6eaaeb7bf8f6ca2b4..88f54544b06ce7249acd8b3dd009ed288937cbd3 100644 (file)
@@ -1722,7 +1722,7 @@ StripElem *give_stripelem(Sequence *seq, int cfra)
        }
        if (seq->strobe < 1.0) seq->strobe = 1.0;
        if (seq->strobe > 1.0) {
-               nr -= ((int)(nr*1000.0) % (int)(seq->strobe*1000.0))/1000.0;
+               nr -= (int)fmodf(nr, seq->strobe);
        }
 
        se+= nr; /* don't get confused by the increment, this is the same as strip->stripdata[nr], which works on some compilers...*/