Ejemplo n.º 1
0
 public Tile Rotate(DiscreteRotation rotation) => new Tile(Id, Grid.Rotate(rotation));
Ejemplo n.º 2
0
 public Vector Rotate(DiscreteRotation rotation)
 => ((int)rotation).Mod(4) switch
 {
     1 => new Vector(+Y, -X),
Ejemplo n.º 3
0
 /// <summary>Rotates this point around a center.</summary>
 /// <param name="other">
 /// The point to rotate around.
 /// </param>
 /// <param name="rotation">
 /// Rotation to perform.
 /// </param>
 public Point Rotate(Point other, DiscreteRotation rotation) => other + (this - other).Rotate(rotation);