public static FastScaleByteByByte ( byte a, byte b ) : byte | ||
a | byte | |
b | byte | |
return | byte |
public static byte FastScaleByteByByte(byte a, byte b)
{
int r1 = a * b + 0x80;
int r2 = ((r1 >> 8) + r1) >> 8;
return (byte)r2;
}