Fixed glm::step that didn't work with scalars #684
This commit is contained in:
@@ -527,6 +527,20 @@ namespace step_
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
// scalar
|
||||
{
|
||||
float const Edge = 2.0f;
|
||||
|
||||
float const A = glm::step(Edge, 1.0f);
|
||||
Error += glm::epsilonEqual(A, 0.0f, glm::epsilon<float>()) ? 0 : 1;
|
||||
|
||||
float const B = glm::step(Edge, 3.0f);
|
||||
Error += glm::epsilonEqual(B, 1.0f, glm::epsilon<float>()) ? 0 : 1;
|
||||
|
||||
float const C = glm::step(Edge, 2.0f);
|
||||
Error += glm::epsilonEqual(C, 1.0f, glm::epsilon<float>()) ? 0 : 1;
|
||||
}
|
||||
|
||||
// vec4 and float
|
||||
{
|
||||
for (std::size_t i = 0; i < sizeof(TestVec4Scalar) / sizeof(entry<float, glm::vec4>); ++i)
|
||||
|
||||
Reference in New Issue
Block a user