Skip to content

Commit 0502e2b

Browse files
godot-core: bug: fix size calculation in Rect2i::from_corners
1 parent 096eccd commit 0502e2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

godot-core/src/builtin/rect2i.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl Rect2i {
5858
pub fn from_corners(position: Vector2i, end: Vector2i) -> Self {
5959
Self {
6060
position,
61-
size: position + end,
61+
size: end - position,
6262
}
6363
}
6464

0 commit comments

Comments
 (0)