Skip to content

Instantly share code, notes, and snippets.

View AMindToThink's full-sized avatar

Matthew Khoriaty AMindToThink

View GitHub Profile
@dLopreiato
dLopreiato / ConvexHull.cs
Last active July 4, 2023 21:39
Code Complete Convex Hull c# for Unity
/* This is taken from this blog post:
* http://loyc-etc.blogspot.ca/2014/05/2d-convex-hull-in-c-45-lines-of-code.html
*
* All I have done is renamed "DList" to "CircularList" and then wrote a wrapper for the generic C# list.
* The structure that is supposed to be used is *much* more efficient, but this works for my purposes.
*
* This can be dropped right into your Unity project and will work without any adjustments.
*/
using System.Collections.Generic;
using UnityEngine;