diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc index cd71e415..cfea2e98 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc @@ -1173,7 +1173,7 @@ void FVc::raise(typename M::VertexHandle& _vh, state_t _target_state) c = _2over3 * ( cos( _2pi / valence) + 1.0); #else valence = Base::mesh_.valence(_vh); - c = coeff(valence); + c = typename M::Scalar(coeff(valence)); #endif @@ -1193,7 +1193,7 @@ void FVc::raise(typename M::VertexHandle& _vh, state_t _target_state) position += MOBJ(Base::mesh_.FH(*voh_it)).position(_target_state - 1) * c; - position += MOBJ(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it)))).position(_target_state - 1) * (1.0 - c); + position += MOBJ(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it)))).position(_target_state - 1) * ( typename M::Scalar(1.0) - c); } else { diff --git a/src/Unittests/unittests_smoother.cc b/src/Unittests/unittests_smoother.cc index 46f5bb50..1f95ad40 100644 --- a/src/Unittests/unittests_smoother.cc +++ b/src/Unittests/unittests_smoother.cc @@ -71,10 +71,10 @@ TEST_F(OpenMeshSmoother_Triangle, Smoother_Poly_Laplace) { OpenMesh::Smoother::JacobiLaplaceSmootherT smoother(mesh_); // Just call function to instanciate template - smoother.set_absolute_local_error(0.5); + smoother.set_absolute_local_error(0.5f); // Set an error - smoother.set_relative_local_error(0.1); + smoother.set_relative_local_error(0.1f); // Run algorithm with 5 steps smoother.smooth(5);