add code to care about the edge cases (y=0 and x=y if you do not want 1 as possible result)Code:x = BitConverter.Touint32(byteVal.ToArray, 0) y = BitConverter.Touint32(byteVal.ToArray, 4) rv = x / y
edit: of course you need to exchange x and y if x > y so that y is always bigger or equal x. But i guess you get the point.




Reply With Quote