mirror of https://github.com/bjornbytes/lovr.git
Change circle size argument from diameter to radius;
This commit is contained in:
parent
51ce0c1418
commit
429efcb38d
|
@ -948,8 +948,8 @@ void lovrGraphicsArc(DrawStyle style, ArcMode mode, Material* material, mat4 tra
|
|||
float angleShift = (r2 - r1) / (float) segments;
|
||||
|
||||
for (int i = 0; i <= segments; i++) {
|
||||
float x = cosf(theta) * .5f;
|
||||
float y = sinf(theta) * .5f;
|
||||
float x = cosf(theta);
|
||||
float y = sinf(theta);
|
||||
memcpy(vertices, ((float[]) { x, y, 0.f, 0.f, 0.f, 1.f, x + .5f, 1.f - (y + .5f) }), 8 * sizeof(float));
|
||||
vertices += 8;
|
||||
theta += angleShift;
|
||||
|
|
Loading…
Reference in New Issue