Bump to c++20
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, macos-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
Remove KRMIN, KRMAX, and KRCLAMP helpers.
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "../include/hydra.h"
|
||||
#include "assert.h"
|
||||
#include "krhelpers.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace hydra {
|
||||
|
||||
@@ -386,7 +387,7 @@ void AABB::encapsulate(const Vector3& v)
|
||||
|
||||
Vector3 AABB::nearestPoint(const Vector3& v) const
|
||||
{
|
||||
return Vector3::Create(KRCLAMP(v.x, min.x, max.x), KRCLAMP(v.y, min.y, max.y), KRCLAMP(v.z, min.z, max.z));
|
||||
return Vector3::Create(std::clamp(v.x, min.x, max.x), std::clamp(v.y, min.y, max.y), std::clamp(v.z, min.z, max.z));
|
||||
}
|
||||
|
||||
} // namespace hydra
|
||||
|
||||
Reference in New Issue
Block a user