add new bbox function

This commit is contained in:
ohyzha
2025-01-27 18:47:34 +02:00
parent 8a9a2303fa
commit b418381fd7

View File

@@ -59,6 +59,16 @@ namespace OpenVulkano::Math
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)
{
Range<T>::min = Math::Utils::min(Range<T>::min, point);