mirror of
https://github.com/Xevion/procedural-placement.git
synced 2025-12-06 05:16:05 -06:00
remove incorrect "diameter" math
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user