summaryrefslogtreecommitdiff
path: root/indra/llmath/llrect.h
diff options
context:
space:
mode:
authorKarl Steifvater <qarl@lindenlab.com>2008-07-22 20:12:37 +0000
committerKarl Steifvater <qarl@lindenlab.com>2008-07-22 20:12:37 +0000
commitdf4f20d4f51e41355e876f734527b4245543415c (patch)
tree36aaf66ddb96b27fb9701764153cd7d17add275a /indra/llmath/llrect.h
parent0c0391cc7114bd2e9e4462c40e88814326f61bc2 (diff)
merge uv-picking branch.
svn merge -r92602:92632 svn+ssh://svn.lindenlab.com/svn/linden/branches/uv-picking-4
Diffstat (limited to 'indra/llmath/llrect.h')
-rw-r--r--indra/llmath/llrect.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/llmath/llrect.h b/indra/llmath/llrect.h
index 17fa981c7c..21ca4189ff 100644
--- a/indra/llmath/llrect.h
+++ b/indra/llmath/llrect.h
@@ -183,10 +183,11 @@ public:
LLRectBase& setCenterAndSize(Type x, Type y, Type width, Type height)
{
+ // width and height could be odd, so favor top, right with extra pixel
mLeft = x - width/2;
- mTop = y + height/2;
- mRight = x + width/2;
mBottom = y - height/2;
+ mTop = mBottom + height;
+ mRight = mLeft + width;
return *this;
}