void moveCircle(float dt, int radius) { //so center of screen will be rotation point        setPosition(400+cos(_angle)*radius, 400 - sin(_angle)*radius);          _angle += (2*pi)*dt;        if (_angle >= (2 * pi)) {            _angle -= (2 * pi);        }        this->rotate(-2*dt*180);    }sf::Vector2f rotateCoordinate(sf::Vector2f mouseCoords, float angle) {            return sf::Vector2f((mouseCoords.x*cos(angle) + mouseCoords.y*sin(angle)), (mouseCoords.y*cos(angle) - mouseCoords.x*sin(angle)));    }void angleShipToMouse(sf::RenderWindow* window) {        if (sf::Mouse::isButtonPressed(sf::Mouse::Button::Left)) {            sf::Vector2f mousePosition(sf::Mouse::getPosition(*window));            std::cout << mousePosition.x << ,  << mousePosition.y << std::endl;             if (mousePosition.x > _windowWidth || mousePosition.x < 0 || mousePosition.y<0 || mousePosition.y>_windowHeight) {                return;            }            //position of mouse relative to ship in 0 rotation reference frame(absolute)            sf::Vector2f mouseRelativeShip(mousePosition.x - getX(), (mousePosition.y - getY()));             //adjusting coordinates to any rotation the sprite has to account for change in orientation of axis.             mouseRelativeShip = rotateCoordinate(mouseRelativeShip, _angle*(pi/180));             float angle = atan2(mouseRelativeShip.y, mouseRelativeShip.x) *(180 / pi); //atan2 produces negative angles QUADS 1&2, positive in QUADS 3&4            this->rotate(angle);            _angle = this->getRotation();         }    }So these are different fns obviously the first one is unrelated really to the other 2 - just want your opinion on how its done since i didnt look at any examples of others before doing it. I'm wondering if my angleShipToMouse is good code because I honestly got really confused on whether I wanted the local coordinates of the object to show y+ as being above the sprite or to just keep it as y- and how this would affect the rotation, in fact it took a long time of just tinkering to  get it to work and I'm unsure specifically why this setup works with y- pointing up. I understand trig but the whole axis issue and the fact that rotation is measured clockwise here when it's normally anti-clockwise, really messed up my brain, lol.The circle one just moves in a circle with the space ship angled in a way that looks like its travelling around it. 
Trig based functions in sfml, angling of sprites
c++;computational geometry;graphics;sfml