aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmath/llrect.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llmath/llrect.h')
-rw-r--r--linden/indra/llmath/llrect.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/linden/indra/llmath/llrect.h b/linden/indra/llmath/llrect.h
index f2a5d75..ebe5d83 100644
--- a/linden/indra/llmath/llrect.h
+++ b/linden/indra/llmath/llrect.h
@@ -183,10 +183,11 @@ public:
183 183
184 LLRectBase& setCenterAndSize(Type x, Type y, Type width, Type height) 184 LLRectBase& setCenterAndSize(Type x, Type y, Type width, Type height)
185 { 185 {
186 // width and height could be odd, so favor top, right with extra pixel
186 mLeft = x - width/2; 187 mLeft = x - width/2;
187 mTop = y + height/2;
188 mRight = x + width/2;
189 mBottom = y - height/2; 188 mBottom = y - height/2;
189 mTop = mBottom + height;
190 mRight = mLeft + width;
190 return *this; 191 return *this;
191 } 192 }
192 193