public static void drawCircle(
this SpriteBatch spriteBatch,
Vector2 position,
float radius,
Color color,
float thickness = 1f,
int resolution = 12)
{
var last = Vector2.UnitX * radius;
var lastP = Vector2Ext.perpendicular(last);
for (int i = 1; i <= resolution; i++)
{
var at = Mathf.angleToVector(i * MathHelper.PiOver2 / resolution, radius);
var atP = Vector2Ext.perpendicular(at);
drawLine(spriteBatch, position + last, position + at, color, thickness);
drawLine(spriteBatch, position - last, position - at, color, thickness);
drawLine(spriteBatch, position + lastP, position + atP, color, thickness);
drawLine(spriteBatch, position - lastP, position - atP, color, thickness);
last = at;
lastP = atP;
}
}