Skip to content

Commit

Permalink
Simplify examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dsieger committed Apr 8, 2022
1 parent 08ad881 commit 71c7b47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/SurfaceMeshBarycenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ int main(int argc, char** argv)

Point p(0, 0, 0);

for (auto vit : mesh.vertices())
for (auto v : mesh.vertices())
{
// access point property like an array
p += points[vit];
p += points[v];
}

p /= mesh.n_vertices();
Expand Down
4 changes: 2 additions & 2 deletions examples/SurfaceMeshIterators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ int main(int argc, char** argv)
float mean_valence = 0.0f;

// loop over all vertices
for (auto vit : mesh.vertices())
for (auto v : mesh.vertices())
{
// sum up vertex valences
mean_valence += mesh.valence(vit);
mean_valence += mesh.valence(v);
}

mean_valence /= mesh.n_vertices();
Expand Down

0 comments on commit 71c7b47

Please sign in to comment.