From 548a73bfade1e6ecab997683908afa7e34d83c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 5 Jan 2018 11:05:08 +0100 Subject: [PATCH] calc_sector_angle: Check for real division by zero not with epsilon that was way to large --- Doc/changelog.docu | 1 + src/OpenMesh/Core/Mesh/PolyMeshT.hh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/changelog.docu b/Doc/changelog.docu index 5ec664d7..9aff8b23 100644 --- a/Doc/changelog.docu +++ b/Doc/changelog.docu @@ -24,6 +24,7 @@
  • Added 1-4 triangle split funtion(splits all edges at Midpoints)
  • Boost range support (Thanks to Bastian Pranzas for the patch)
  • Made the face and edge split operations that copy properties also copy builtin properties
  • +
  • calc_sector_angle: Check for real division by zero not with epsilon that was way to large
  • Utils diff --git a/src/OpenMesh/Core/Mesh/PolyMeshT.hh b/src/OpenMesh/Core/Mesh/PolyMeshT.hh index 0554161e..b29ea40e 100644 --- a/src/OpenMesh/Core/Mesh/PolyMeshT.hh +++ b/src/OpenMesh/Core/Mesh/PolyMeshT.hh @@ -445,7 +445,7 @@ public: Normal v0, v1; calc_sector_vectors(_in_heh, v0, v1); Scalar denom = v0.norm()*v1.norm(); - if (is_zero(denom)) + if ( denom == Scalar(0)) { return 0; }