Below is a code sample from the collision system I programmed for Mosh Pit. This sample shows the collision detection between two any-sided convex polygons. As per my implementation of the Separating Axis Theorem, I iterate through every normal vector of both polygons checking if there is a gap between the two polygons when I project all the points into one dimension. If there is no gap, I save the shortest penetration depth and other relative information for position correction and impulse-based collision resolution.