Table of Contents

Method ConvexPeaks

Namespace
GrindFest.Generation.Common
Assembly
GrindFest.dll

ConvexPeaks(IList<Vector2>, float)

For each vertex, returns true if its interior angle is sharper than (180° - thresholdDegrees) — i.e. a convex "peak" that should get a tower.

public static IEnumerable<(int index, Vector2 pos)> ConvexPeaks(IList<Vector2> poly, float thresholdDegrees)

Parameters

poly IList<Vector2>
thresholdDegrees float

Returns

IEnumerable<(int index, Vector2 pos)>