Floats aren't slowMichael Vogel wrote:yep, but I thought a floating point would slowing it down. More surprising is, why 'n*255/100' is faster than 'n*255 : n/100' and why the same formula is done quicker outside the procedure than inside?!
And n = n*255/100 is faster as n = n*255 : n = n/100 because it's less work to do it at once compared to storing the result in between.