{
offset=GetStopColorOffset(gradient,x,y);
if (gradient->type != RadialGradient)
- offset/=length;
+ offset*=PerceptibleReciprocal(length);
}
for (i=0; i < (ssize_t) gradient->number_stops; i++)
if (offset < gradient->stops[i].offset)
{
offset=GetStopColorOffset(gradient,x,y);
if (gradient->type != RadialGradient)
- offset/=length;
+ offset*=PerceptibleReciprocal(length);
}
if (offset < 0.0)
offset=(-offset);
repeat=fmod(offset,length);
antialias=(repeat < length) && ((repeat+1.0) > length) ?
MagickTrue : MagickFalse;
- offset=repeat/length;
+ offset=PerceptibleReciprocal(length)*repeat;
}
else
{