public void ConvertFromFloatToIntRoundsDownWhenLessThanFiveNegative() { int expected = -0; float startingFloat = -0.4999f; int actual = GridMath.ConvertFromFloatToInt(startingFloat); Assert.Equal(expected, actual); }
public void ConvertFromFloatToIntRoundsDownWhenLessThanFive() { var expected = 0; var startingFloat = 0.4999f; int actual = GridMath.ConvertFromFloatToInt(startingFloat); Assert.Equal(expected, actual); }
public void ConvertFromFloatToIntCanRoundAndConvertNegativeCorrectly() { int expected = -1; float startingFloat = -0.51f; int actual = GridMath.ConvertFromFloatToInt(startingFloat); Assert.Equal(expected, actual); }
public void ConvertFromFloatToIntCanRoundAndConvertCorrectly() { var expected = 1; var startingFloat = 0.51f; int actual = GridMath.ConvertFromFloatToInt(startingFloat); Assert.Equal(expected, actual); }