title: A function for spinning objects around a center point
body: <p>I am trying to code a game in C++ using SFML, in which several space ships attack a planet from different sides. I want the space ships that attack the planet to face the planet while they attack (obviously). The problem I am having is figuring out a formula that would work for every x and y position. If the sprite for the ship starts off by facing upwards, what would be the best way to approach this? </p>
  
  <p>For example, if the ship spawns on the right side of the planet, the ship sprite should rotate to the left, towards the center of the planet.</p>