Esempio n. 1
0
 public void FromCartesian()
 {
     Assert.AreEqual(V2.Zero, IsometricCoords.FromCartesian(V2.Zero));
     Assert.AreEqual(new V2(-1, 3), IsometricCoords.FromCartesian(V2.One));
     Assert.AreEqual(new V2(-2, 2), IsometricCoords.FromCartesian(V2.Up));
     Assert.AreEqual(new V2(-1, -1), IsometricCoords.FromCartesian(V2.Left));
 }
Esempio n. 2
0
 public void ToCartesian()
 {
     Assert.AreEqual(V2.Zero, IsometricCoords.ToCartesian(new V2(0, 0)));
     Assert.AreEqual(V2.One, IsometricCoords.ToCartesian(new V2(-1, 3)));
     Assert.AreEqual(V2.Up, IsometricCoords.ToCartesian(new V2(-2, 2)));
     Assert.AreEqual(V2.Left, IsometricCoords.ToCartesian(new V2(-1, -1)));
 }