Skip to content

Commit fc1fde2

Browse files
Store 2*pi in a variable (tau).
1 parent af866d5 commit fc1fde2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/Graphics/MeshShaders/SimpleLines.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ void main(uint groupThreadID: SV_GroupThreadID, out vertices PSInput verts[32],
2020

2121
const float radius = 0.5;
2222
const float angle = float(groupThreadID) / 32.0f;
23-
const float x = cos(angle * 2 * 3.14159265358) * radius;
24-
const float y = sin(angle * 2 * 3.14159265358) * radius;
23+
const float tau = 2.0 * 3.14159265359
24+
const float x = cos(angle * tau) * radius;
25+
const float y = sin(angle * tau) * radius;
2526

2627
const float3 color = hueToRgb(angle);
2728

0 commit comments

Comments
 (0)