Rename Rect2 and Rect2i grow_margin() to grow_side()

This commit is contained in:
Marcel Admiraal 2020-12-28 09:11:58 +00:00
parent be509bf5e4
commit b628912af0
12 changed files with 117 additions and 117 deletions

View file

@ -197,11 +197,11 @@ TEST_CASE("[Rect2] Growing") {
"grow_individual() with positive and negative values should return the expected Rect2.");
CHECK_MESSAGE(
Rect2(0, 100, 1280, 720).grow_margin(SIDE_TOP, 500).is_equal_approx(Rect2(0, -400, 1280, 1220)),
"grow_margin() with positive value should return the expected Rect2.");
Rect2(0, 100, 1280, 720).grow_side(SIDE_TOP, 500).is_equal_approx(Rect2(0, -400, 1280, 1220)),
"grow_side() with positive value should return the expected Rect2.");
CHECK_MESSAGE(
Rect2(0, 100, 1280, 720).grow_margin(SIDE_TOP, -500).is_equal_approx(Rect2(0, 600, 1280, 220)),
"grow_margin() with negative value should return the expected Rect2.");
Rect2(0, 100, 1280, 720).grow_side(SIDE_TOP, -500).is_equal_approx(Rect2(0, 600, 1280, 220)),
"grow_side() with negative value should return the expected Rect2.");
}
TEST_CASE("[Rect2] Has point") {
@ -409,11 +409,11 @@ TEST_CASE("[Rect2i] Growing") {
"grow_individual() with positive and negative values should return the expected Rect2i.");
CHECK_MESSAGE(
Rect2i(0, 100, 1280, 720).grow_margin(SIDE_TOP, 500) == Rect2i(0, -400, 1280, 1220),
"grow_margin() with positive value should return the expected Rect2i.");
Rect2i(0, 100, 1280, 720).grow_side(SIDE_TOP, 500) == Rect2i(0, -400, 1280, 1220),
"grow_side() with positive value should return the expected Rect2i.");
CHECK_MESSAGE(
Rect2i(0, 100, 1280, 720).grow_margin(SIDE_TOP, -500) == Rect2i(0, 600, 1280, 220),
"grow_margin() with negative value should return the expected Rect2i.");
Rect2i(0, 100, 1280, 720).grow_side(SIDE_TOP, -500) == Rect2i(0, 600, 1280, 220),
"grow_side() with negative value should return the expected Rect2i.");
}
TEST_CASE("[Rect2i] Has point") {