Update JGL.cpp
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m47s
All checks were successful
Run ReCI Build Test / Explore-Gitea-Actions (push) Successful in 1m47s
Fix memory error
This commit is contained in:
@@ -572,7 +572,7 @@ namespace JGL {
|
||||
for (angle = 0.0f; angle < (2.f * Math::Pi); angle += step) {
|
||||
x = radius * std::sin(angle) + center.x;
|
||||
y = radius * std::cos(angle) + center.y;
|
||||
if (i <= subdivisions)
|
||||
if (i < subdivisions)
|
||||
vertices[i] = {x, y};
|
||||
else
|
||||
vertices.emplace_back(x, y);
|
||||
@@ -601,7 +601,7 @@ namespace JGL {
|
||||
for (angle = 0.0f; angle < (2.f * Math::Pi); angle += step) {
|
||||
x = radius * std::sin(angle) + center.x;
|
||||
y = radius * std::cos(angle) + center.y;
|
||||
if (i <= subdivisions)
|
||||
if (i < subdivisions)
|
||||
vertices[i] = {x, y};
|
||||
else
|
||||
vertices.emplace_back(x, y);
|
||||
|
Reference in New Issue
Block a user