Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Software/math/PrismatikMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
namespace PrismatikMath
{
//Observer= 2°, Illuminant= D65
const float refX = 95.047;
const float refY = 100.000;
const float refZ = 108.883;
const float refX = 95.047f;
const float refY = 100.000f;
const float refZ = 108.883f;

template<typename A, typename T>
T withinRange(A x, T min, T max)
Expand Down
4 changes: 4 additions & 0 deletions Software/math/include/PrismatikMath.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,9 @@ namespace PrismatikMath
return qrand() % val;
}

inline double round(double number)
{
return number < 0.0 ? std::ceil(number - 0.5) : std::floor(number + 0.5);
}
}