public static void DrawLine(SpriteBatch batch, Point start, Point end, Color c, int width)
{
if (lineTexture == null) lineTexture = GetClearTexture2D(batch);
if (c.A == 0) return;
if (end.X < start.X)
{
// Swap
Point temp = start;
start = end;
end = temp;
}
double hypoteneuse = PathfindingUtil.GetHypoteneuseLength(start, end);
float angle = PathfindingUtil.GetHypoteneuseAngleRad(start, end);
batch.Draw(lineTexture, new Rectangle(start.X, start.Y, (int)Math.Round(hypoteneuse), width), null, c, angle,
new Vector2(0, 0), SpriteEffects.None, 0);
}