GetReverse() public method

public GetReverse ( ) : Vector2D
return Vector2D
Example #1
0
        public void Reflect(Vector2D normal)
        {
            Vector2D reflectiveVector = 2.0 * GetDotProduct(normal) * normal.GetReverse();

            _x += reflectiveVector.X;
            _y += reflectiveVector.Y;
        }
Example #2
0
        public void Reflect(Vector2D normal)
        {
            Vector2D temp = new Vector2D(this);

            temp += 2.0 * GetDotProduct(normal) * normal.GetReverse();

            // copy calculated values over
            x = temp.x;
            y = temp.y;
        }
Example #3
0
        public void Reflect(Vector2D normal)
        {
            Vector2D temp = new Vector2D(this);
            temp += 2.0 * GetDotProduct(normal) * normal.GetReverse();

            // copy calculated values over
            x = temp.x;
            y = temp.y;
        }
        public void Reflect(Vector2D normal)
        {
            Vector2D reflectiveVector = 2.0 * GetDotProduct(normal) * normal.GetReverse();

            _x += reflectiveVector.X;
            _y += reflectiveVector.Y;
        }