diff --git a/vcg/complex/algorithms/local_optimization/quad_diag_collapse.h b/vcg/complex/algorithms/local_optimization/quad_diag_collapse.h index c4078ff9..ca83278a 100755 --- a/vcg/complex/algorithms/local_optimization/quad_diag_collapse.h +++ b/vcg/complex/algorithms/local_optimization/quad_diag_collapse.h @@ -91,14 +91,14 @@ namespace vcg{ */ static bool check_feasible(HEdgePointer hp, CoordType &V1, CoordType &V2, TriMeshType &tm, GRID &grid) { - float lenght = Distance( V1, V2 ); + float length = Distance( V1, V2 ); Fitmap_attr M_Fit = tri::Allocator::template GetPerVertexAttribute(tm,"M-Fitmap"); CoordType P = (V1+V2)/2; float fitmap = compute_fitmap(hp, P, tm, grid, M_Fit); - return lenght <= fitmap/Mfit_coeff(); + return length <= fitmap/Mfit_coeff(); } /*! Computes the weight of a diagonal using S-Fitmap diff --git a/vcg/space/box2.h b/vcg/space/box2.h index da0dd00f..72a7d5d8 100644 --- a/vcg/space/box2.h +++ b/vcg/space/box2.h @@ -216,7 +216,7 @@ public: */ inline bool IsEmpty() const { return min==max; } - /// Computes lenght of diagonal + /// Computes length of diagonal ScalarType Diag() const { return Distance(min,max); diff --git a/vcg/space/segment2.h b/vcg/space/segment2.h index 61b2201b..86abb916 100644 --- a/vcg/space/segment2.h +++ b/vcg/space/segment2.h @@ -106,7 +106,7 @@ public: ScalarType Length() const { return (_p0 - _p1).Norm(); } - /// return segment squared lenght + /// return segment squared length ScalarType SquaredLength() { return (_p0 - _p1).SquaredNorm(); } /// flips: a-b becomes b-a @@ -150,10 +150,10 @@ Point2 ClosestPoint( Segment2 s, const Point2 clos = l.P(t); - ScalarType lenght = s.Length(); + ScalarType length = s.Length(); if (t <= 0) return s.P0(); - else if (t >= lenght) + else if (t >= length) return s.P1(); else return clos;