From 2d8b2dabc5d247f297c0c73c54763f79366fc2b3 Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Tue, 2 Jun 2015 15:13:55 +0300 Subject: [PATCH] Review fixes --- drape_frontend/line_shape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drape_frontend/line_shape.cpp b/drape_frontend/line_shape.cpp index be09d642e4..1dfab2ced7 100644 --- a/drape_frontend/line_shape.cpp +++ b/drape_frontend/line_shape.cpp @@ -259,7 +259,7 @@ namespace glsl::vec2 const v2 = newPoint - startPoint; float const squareLen = glsl::dot(v1, v1); float const proj = glsl::dot(v1, v2) / squareLen; - return sqrt(squareLen) * max(min(proj, 1.0f), 0.0f); + return sqrt(squareLen) * my::clamp(proj, 0.0f, 1.0f); } void CalculateTangentAndNormals(glsl::vec2 const & pt0, glsl::vec2 const & pt1,