Merge branch 'master' of github.com:assimp/assimp

pull/502/head
Alexander Gessler 2015-02-05 20:12:31 +01:00
commit 8c9362e744
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ void TempMesh::Transform(const IfcMatrix4& mat)
// ------------------------------------------------------------------------------
IfcVector3 TempMesh::Center() const
{
return std::accumulate(verts.begin(),verts.end(),IfcVector3()) / static_cast<IfcFloat>(verts.size());
return (verts.size() == 0) ? IfcVector3(0.0f, 0.0f, 0.0f) : (std::accumulate(verts.begin(),verts.end(),IfcVector3()) / static_cast<IfcFloat>(verts.size()));
}
// ------------------------------------------------------------------------------------------------