add new bbox function
This commit is contained in:
@@ -59,6 +59,16 @@ namespace OpenVulkano::Math
|
|||||||
Range<T>::max = other.GetMax();
|
Range<T>::max = other.GetMax();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Stretch(T::value_type scalar)
|
||||||
|
{
|
||||||
|
if (IsEmpty()) [[unlikely]]
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Range<T>::min -= scalar;
|
||||||
|
Range<T>::max += scalar;
|
||||||
|
}
|
||||||
|
|
||||||
void Grow(const T& point)
|
void Grow(const T& point)
|
||||||
{
|
{
|
||||||
Range<T>::min = Math::Utils::min(Range<T>::min, point);
|
Range<T>::min = Math::Utils::min(Range<T>::min, point);
|
||||||
|
|||||||
Reference in New Issue
Block a user