From 7bb868b2bef21598645b0aa8cb9e49a9683b238e Mon Sep 17 00:00:00 2001 From: Christian Mattes Date: Mon, 16 Apr 2018 13:15:45 +0200 Subject: [PATCH] Replaced usage of length() by norm() to avoid forcing both to be implemented --- src/OpenMesh/Core/Mesh/PolyMeshT.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OpenMesh/Core/Mesh/PolyMeshT.hh b/src/OpenMesh/Core/Mesh/PolyMeshT.hh index 90def28f..31796fb8 100644 --- a/src/OpenMesh/Core/Mesh/PolyMeshT.hh +++ b/src/OpenMesh/Core/Mesh/PolyMeshT.hh @@ -444,7 +444,7 @@ public: { Normal v0, v1; calc_sector_vectors(_in_heh, v0, v1); - Scalar denom = length(v0)*length(v1); + Scalar denom = norm(v0)*norm(v1); if ( denom == Scalar(0)) { return 0; @@ -470,7 +470,7 @@ public: Normal in_vec, out_vec; calc_edge_vector(_in_heh, in_vec); calc_edge_vector(next_halfedge_handle(_in_heh), out_vec); - Scalar denom = length(in_vec)*length(out_vec); + Scalar denom = norm(in_vec)*norm(out_vec); if (is_zero(denom)) { _cos_a = 1; @@ -479,7 +479,7 @@ public: else { _cos_a = dot(in_vec, out_vec)/denom; - _sin_a = length(cross(in_vec, out_vec))/denom; + _sin_a = norm(cross(in_vec, out_vec))/denom; } } */ @@ -499,7 +499,7 @@ public: { Normal sector_normal; calc_sector_normal(_in_heh, sector_normal); - return length(sector_normal)/2; + return norm(sector_normal)/2; } /** calculates the dihedral angle on the halfedge _heh