   [SFML and c++]Moving a Pong ball depending on angle?
  Hello everyone, I recently began using SFML after using SDL for some weeks, I did a SDL pong game but I dont remember how it was done, and code was more horrible than my new version. First let me show you the code.//Pong game yet to finish#include <SFML/Graphics.hpp>#include <SFML/Audio.hpp>const int ScreenWidth  = 550;const int ScreenHeight = 450;enum Player {Player1, Player2, Computer};class Paddle{public:Paddle(const Player& play) : player(play), rect(sf::Shape::Rectangle(0,0,10,100, sf::Color(200,200,200))){rect.SetPosition(0, (ScreenHeight / 2) -  50);if(player == Player2 || player == Computer)rect.SetPosition(ScreenWidth - 10,  rect.GetPosition().y);}void Move(const sf::RenderWindow& win){const float delta = Speed * win.GetFrameTime();//Collision with wallsif(rect.GetPosition().y < 0) rect.SetPosition(rect.GetPosition().x, 0);if(rect.GetPosition().y > ScreenHeight - 100)rect.SetPosition(rect.GetPosition().x, ScreenHeight - 100);switch(player){case Player1:if(win.GetInput().IsKeyDown(sf::Key::Down)) rect.Move(0,  delta);if(win.GetInput().IsKeyDown(sf::Key::Up))   rect.Move(0, -delta); break;case Player2:if(win.GetInput().IsKeyDown(sf::Key::S))rect.Move(0,  delta);if(win.GetInput().IsKeyDown(sf::Key::W))rect.Move(0, -delta); break;case Computer:break;}}void Draw(sf::RenderWindow& win) const{win.Draw(rect);}sf::Vector2f Position() const{return rect.GetPosition();}private:sf::Shape rect;Player player;enum { Speed = 200 };};class Ball{public:Ball(): circle(sf::Shape::Circle(ScreenWidth / 2, ScreenHeight / 2, 10, sf::Color(200,200,200))){}void Draw(sf::RenderWindow& window){window.Draw(circle);//The differente between the position and width//float diX =  circle.GetPosition().x + ScreenWidth / 2;//float diY =  circle.GetPosition().y + ScreenHeight / 2;}private:sf::Shape circle;};int main(){sf::RenderWindow window(sf::VideoMode(ScreenWidth,ScreenHeight), "Pong Game");Paddle player1(Player1);Paddle player2(Player2);Ball ball;while(window.IsOpened()){sf::Event event;while(window.GetEvent (event))if(event.Type == sf::Event::Closed)window.Close();if(window.GetInput().IsKeyDown(sf::Key::Escape)) window.Close();window.Clear(sf::Color(100,100,100));player1.Move(window); player2.Move(window);ball.Draw(window);player1.Draw(window);player2.Draw(window);window.Display();}}I have the ball drawn, but I dont know how to actually move it depending on a angle, and bouncing it in a inversed angle, I want to actually do something nice for the collision not like I did in my last pong.Since I have only used SFML for days which class is the equivalent to SDL_Rect when dealing with collisions?Should I change something about my code?Thanks   