Renamed [Box|Rect]::GetSize() to GetLengths()

Former-commit-id: 3c122057634a6472034b284bfe7091acbb41d004
This commit is contained in:
Lynix
2013-06-09 15:34:36 +02:00
parent 7080719287
commit c940abdb75
5 changed files with 19 additions and 19 deletions

View File

@@ -106,7 +106,13 @@ NzRect<T>& NzRect<T>::ExtendTo(const NzRect& rect)
template<typename T>
NzVector2<T> NzRect<T>::GetCenter() const
{
return NzVector2<T>(x + width/F(2.0), y + height/F(2.0));
return GetPosition() + F(0.5)*GetLengths();
}
template<typename T>
NzVector2<T> NzRect<T>::GetLengths() const
{
return NzVector2<T>(width, height);
}
template<typename T>
@@ -143,12 +149,6 @@ NzVector2<T> NzRect<T>::GetPositiveVertex(const NzVector2<T>& normal) const
return pos;
}
template<typename T>
NzVector2<T> NzRect<T>::GetSize() const
{
return NzVector2<T>(width, height);
}
template<typename T>
bool NzRect<T>::Intersect(const NzRect& rect, NzRect* intersection) const
{