Files
Juliet/Juliet/include/Core/Math/MathUtils.h
Patedam a9fe4683fb Graphics pipeline iteration
Lot of code.
Not working yet
2025-03-09 22:52:08 -04:00

38 lines
682 B
C++

#pragma once
namespace Juliet
{
extern JULIET_API float RoundF(float value);
inline int32 LRoundF(float value)
{
return RoundF(value);
}
template <typename Type>
constexpr Type Min(Type lhs, Type rhs)
{
return rhs < lhs ? rhs : lhs;
}
template <typename Type>
constexpr Type Max(Type lhs, Type rhs)
{
return lhs < rhs ? rhs : lhs;
}
template <typename Type>
constexpr Type Clamp(Type val, Type min, Type max)
{
if (val < min)
{
return min;
}
if (val > max)
{
return max;
}
return val;
}
} // namespace Juliet