public void GetMagnitudeFromCoordinates_ForwardsLeft() { var con = new QinetiQ.WindowsIOT.HidDevices.GameController.Vector(); con.SetFromAxes(8000, -8000); double actual = con.magnitude; double expected = 4095; Assert.AreEqual(expected, actual); }
public void GetVectorFromCoordinatesBottomLeft() { var con = new QinetiQ.WindowsIOT.HidDevices.GameController.Vector(); con.SetFromAxes(0, 65536); double actual = con.direction; double expected = 225; Assert.AreEqual(expected, actual); }
public void GetVectorFromCoordinatesTop() { var con = new QinetiQ.WindowsIOT.HidDevices.GameController.Vector(); con.SetFromAxes(32768, 0); double actual = con.direction; double expected = 0; Assert.AreEqual(expected, actual); }