forked from organicmaps/organicmaps
Review fixes
This commit is contained in:
parent
2f4e0b1cae
commit
2d8b2dabc5
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue