Example #1
0
        public Property RotatingBy360Degrees_ShouldEqualItself(int x, int y)
        {
            var vector = new IntVector(x, y);

            return(vector.Rotate(360).Equals(vector).ToProperty());
        }
Example #2
0
        public Property AddingVectorToItself_ShouldEqualMultiplyingByTwo(int x, int y)
        {
            var vector = new IntVector(x, y);

            return((vector + vector).Equals(vector * 2).ToProperty());
        }
Example #3
0
        public Property SubtractingVectorFromItself_ShouldReturnOrigin(int x, int y)
        {
            var vector = new IntVector(x, y);

            return((vector - vector).Equals(IntVector.Origin).ToProperty());
        }
Example #4
0
 public bool Equals(IntVector other) =>
 X == other.X &&
 Y == other.Y;
Example #5
0
        public Property AddingInverses_ShouldReturnOrigin(int x, int y)
        {
            var vector = new IntVector(x, y);

            return((vector.Rotate(180) + vector).Equals(IntVector.Origin).ToProperty());
        }
Example #6
0
        public Property RotatingBy180Degrees_ShouldEqualMultiplyingByMinusOne(int x, int y)
        {
            var vector = new IntVector(x, y);

            return(vector.Rotate(180).Equals(vector * -1).ToProperty());
        }