From 952000378eae07292b53e744f18ad08a1a25c256 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Sat, 11 Feb 2023 17:12:33 +0100 Subject: [PATCH] Fix sign error on rects (#1200) --- crates/re_log_types/src/component_types/rect.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/re_log_types/src/component_types/rect.rs b/crates/re_log_types/src/component_types/rect.rs index 54fefa34f402..8b12d4e63f21 100644 --- a/crates/re_log_types/src/component_types/rect.rs +++ b/crates/re_log_types/src/component_types/rect.rs @@ -57,8 +57,8 @@ impl Rect2D { Rect2D::YXHW(Vec4D([y, x, _h, _w])) => [*x, *y], Rect2D::XYXY(Vec4D([x0, y0, _x1, _y1])) => [*x0, *y0], Rect2D::YXYX(Vec4D([y0, x0, _y1, _x1])) => [*x0, *y0], - Rect2D::XCYCWH(Vec4D([x_cen, y_cen, w, h])) => [x_cen - (w / 2.0), y_cen + (h / 2.0)], - Rect2D::XCYCW2H2(Vec4D([x_cen, y_cen, w_2, h_2])) => [x_cen - w_2, y_cen + h_2], + Rect2D::XCYCWH(Vec4D([x_cen, y_cen, w, h])) => [x_cen - (w / 2.0), y_cen - (h / 2.0)], + Rect2D::XCYCW2H2(Vec4D([x_cen, y_cen, w_2, h_2])) => [x_cen - w_2, y_cen - h_2], } }