From ec50a7332bc52b7691f30c3409af56664653d9e2 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Wed, 15 Nov 2023 13:26:12 -0700 Subject: [PATCH] Fix `sf::Rect` docs --- include/SFML/Graphics/Rect.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/SFML/Graphics/Rect.hpp b/include/SFML/Graphics/Rect.hpp index 85abf4a75..dd93c683a 100644 --- a/include/SFML/Graphics/Rect.hpp +++ b/include/SFML/Graphics/Rect.hpp @@ -214,7 +214,7 @@ using FloatRect = Rect; /// Usage example: /// \code /// // Define a rectangle, located at (0, 0) with a size of 20x5 -/// sf::IntRect r1(0, 0, 20, 5); +/// sf::IntRect r1({0, 0}, {20, 5}); /// /// // Define another rectangle, located at (4, 2) with a size of 18x10 /// sf::Vector2i position(4, 2); @@ -222,8 +222,8 @@ using FloatRect = Rect; /// sf::IntRect r2(position, size); /// /// // Test intersections with the point (3, 1) -/// bool b1 = r1.contains(3, 1); // true -/// bool b2 = r2.contains(3, 1); // false +/// bool b1 = r1.contains({3, 1}); // true +/// bool b2 = r2.contains({3, 1}); // false /// /// // Test the intersection between r1 and r2 /// std::optional result = r1.findIntersection(r2);