Renamed [Box|Rect]::GetSize() to GetLengths()
Former-commit-id: 3c122057634a6472034b284bfe7091acbb41d004
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user