public Property RotatingBy360Degrees_ShouldEqualItself(int x, int y) { var vector = new IntVector(x, y); return(vector.Rotate(360).Equals(vector).ToProperty()); }
public Property AddingVectorToItself_ShouldEqualMultiplyingByTwo(int x, int y) { var vector = new IntVector(x, y); return((vector + vector).Equals(vector * 2).ToProperty()); }
public Property SubtractingVectorFromItself_ShouldReturnOrigin(int x, int y) { var vector = new IntVector(x, y); return((vector - vector).Equals(IntVector.Origin).ToProperty()); }
public bool Equals(IntVector other) => X == other.X && Y == other.Y;
public Property AddingInverses_ShouldReturnOrigin(int x, int y) { var vector = new IntVector(x, y); return((vector.Rotate(180) + vector).Equals(IntVector.Origin).ToProperty()); }
public Property RotatingBy180Degrees_ShouldEqualMultiplyingByMinusOne(int x, int y) { var vector = new IntVector(x, y); return(vector.Rotate(180).Equals(vector * -1).ToProperty()); }