fixes for mac

This commit is contained in:
2017-03-28 09:08:53 +01:00
parent e8cabebe66
commit 2024b3a280
6 changed files with 65 additions and 7 deletions

View File

@@ -31,5 +31,5 @@ glm::vec3 convert_rgb2hsv(const glm::vec3 c)
glm::vec4 q = c.r < p.x ? glm::vec4(p.xyw, c.r) : glm::vec4(c.r, p.yzx);
float d = q.x - glm::min(q.w, q.y);
float e = 1.0e-10f;
return glm::vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
return glm::vec3(fabs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}