dumb dumb energy

This commit is contained in:
Diren D Bharwani 2022-12-30 01:27:31 +08:00
parent 6bab419428
commit 7b1b4873ec
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ namespace SHADE
for (size_t j = 0; j < FACE.vertexIndices.size(); ++j)
{
const int32_t TAIL = FACE.vertexIndices[j];
const int32_t HEAD = j + 1 < FACE.vertexIndices.size() ? FACE.vertexIndices[j + 1] : FACE.vertexIndices[0];
const int32_t HEAD = FACE.vertexIndices[(j + 1) % FACE.vertexIndices.size()];
const uint64_t NEW_EDGE_ID = BUILD_UINT64_FROM_UINT32S(TAIL, HEAD);
const uint64_t TWIN_EDGE_ID = BUILD_UINT64_FROM_UINT32S(HEAD, TAIL);