C sharp divides integers like a child. Throwing away any leftover fractional part. Simply cast the denominator as a double or a float and it will work the way you expect. When you divide by a constant integer remember to put a .0 after the integer to make it a double.