On Tue, Jun 29, 2004 at 10:19:32AM +0200, Benno Senoner wrote: > for (;;) > { > /* Bunch of other code. */ > > fullindex += increment; > integer = lrintf(fullindex); > fractional = fullindex - integer;
I dont think this is right, fractional will be [-0.5, 0.5], rather than [0,1] which is more noirmal as lrintf() rounds to the nearest. I think you should be using lrintf(floor(x)) or (int)x. - Steve