'SFML sf::Transform .translate ignores minus in float variable

I am making a game with a moving camera and I adjust every object drawn using the sf::Transform function and apply it to every draw call.

sf::Transform transform;

transform.translate(-camera.getX(), -camera.getY());

Camera.x is -450.0 and Camera.y is -263.0 and both are stored as floats.

If I run removing the minus before the coordinates in the translate function call it puts the camera at +450.0 and +263.0 rather than -450.0 and -263.0

sf::Transform transform; transform.translate(camera.getX(), camera.getY());

I am confused as to why I need to double up the minuses with both the object variable and the translate function call.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source