remove incorrect "diameter" math

This commit is contained in:
Xevion
2020-05-06 02:21:08 -05:00
parent 0e0154e10e
commit 19ab5d857b

View File

@@ -107,7 +107,7 @@ public static class PointGeneration {
// Vector2 dir = new Vector2(Mathf.Sin(angle), Mathf.Cos(angle)); // Vector2 dir = new Vector2(Mathf.Sin(angle), Mathf.Cos(angle));
// Vector2 candidate = spawnCenter + dir * Random.Range(radius, radius * 2); // Vector2 candidate = spawnCenter + dir * Random.Range(radius, radius * 2);
float theta = 2 * Mathf.PI * (seed + i / attempts); float theta = 2 * Mathf.PI * (seed + i / attempts);
float r = (radius * 2) + epsilon; float r = radius + epsilon;
Vector2 dir = new Vector2(Mathf.Sin(theta), Mathf.Cos(theta)); Vector2 dir = new Vector2(Mathf.Sin(theta), Mathf.Cos(theta));
Vector2 candidate = spawnCenter + r * dir; Vector2 candidate = spawnCenter + r * dir;
// Vector2 candidate = new Vector2( // Vector2 candidate = new Vector2(