SFML community forums
Help => Graphics => Topic started by: T.T.H. on February 09, 2010, 11:20:56 am
-
Shape.cpp of SFML2 revision 1392:
Shape Shape::Rectangle(const Vector2f& p1, ...
{
return Shape::Rectangle(p1.x, p1.y, ...
}
Shape Shape::Rectangle(float p1x, float p1y, ...
{
// Create the shape's points
Shape shape;
shape.AddPoint(Vector2f(p1x, p1y), ...
Vector2f being converted to floats, floats being converted to Vector2f - seems a bit superfluous.
In the other functions (Shape::Line, Shape::Circle) it's different:
floats being converted to Vector2f, Vector2f being used - seems to make more sense.
Just a minor inconsistency I stumbled over...
-
This is because I don't use the points directly, I make combinations of their coordinates to produce the 4 points of the rectangle.