diff --git a/src/wordrec/chop.cpp b/src/wordrec/chop.cpp index 036041d6f1..c15b9a4077 100644 --- a/src/wordrec/chop.cpp +++ b/src/wordrec/chop.cpp @@ -89,7 +89,6 @@ int Wordrec::angle_change(EDGEPT *point1, EDGEPT *point2, EDGEPT *point3) { VECTOR vector2; int angle; - float length; /* Compute angle */ vector1.x = point2->pos.x - point1->pos.x; @@ -97,7 +96,7 @@ int Wordrec::angle_change(EDGEPT *point1, EDGEPT *point2, EDGEPT *point3) { vector2.x = point3->pos.x - point2->pos.x; vector2.y = point3->pos.y - point2->pos.y; /* Use cross product */ - length = (float)sqrt((float)LENGTH(vector1) * LENGTH(vector2)); + float length = std::sqrt(static_cast(LENGTH(vector1)) * LENGTH(vector2)); if ((int) length == 0) return (0); angle = static_cast(floor(asin(CROSS (vector1, vector2) /