Commit 020f990a authored by Isaak Lim's avatar Isaak Lim

- took out static_cast in McDecimater

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@716 fdac6126-5c0c-442c-9429-916003d36597
parent 60e0cb36
......@@ -136,9 +136,9 @@ size_t McDecimaterT<Mesh>::decimate(size_t _n_collapses) {
// Random halfedge handle
#ifdef WIN32
tmpHandle = typename Mesh::HalfedgeHandle(int(randGen.getRand() * (mesh_.n_halfedges() - 1)) );
tmpHandle = typename Mesh::HalfedgeHandle(int(randGen.getRand() * (mesh_.n_halfedges() - 1)) );
#else
tmpHandle = typename Mesh::HalfedgeHandle((static_cast<double>(rand()) / RAND_MAX) * (mesh_.n_halfedges()-1) );
tmpHandle = typename Mesh::HalfedgeHandle( (double(rand()) / double(RAND_MAX) ) * double(mesh_.n_halfedges()-1) );
#endif
// if it is not deleted, we analyse it
......@@ -258,9 +258,9 @@ size_t McDecimaterT<Mesh>::decimate_to_faces(size_t _nv, size_t _nf) {
// Random halfedge handle
#ifdef WIN32
tmpHandle = typename Mesh::HalfedgeHandle(int(randGen.getRand() * (mesh_.n_halfedges() - 1)) );
tmpHandle = typename Mesh::HalfedgeHandle(int(randGen.getRand() * (mesh_.n_halfedges() - 1)) );
#else
tmpHandle = typename Mesh::HalfedgeHandle((static_cast<double>(rand()) / RAND_MAX) * (mesh_.n_halfedges() - 1));
tmpHandle = typename Mesh::HalfedgeHandle( ( double(rand()) / double(RAND_MAX) ) * double(mesh_.n_halfedges() - 1));
#endif
// if it is not deleted, we analyse it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment