Skip to content

Instantly share code, notes, and snippets.

View ksprugevics's full-sized avatar
🌊
Creating stuff I find interesting at the time

Klāvs Spruģevics ksprugevics

🌊
Creating stuff I find interesting at the time
  • Latvia
View GitHub Profile
@theawesomecoder61
theawesomecoder61 / drawarc.lua
Last active May 5, 2024 15:44
Draw arcs or pie charts/graphs in Garry's Mod. I did not make this, this is only re-uploaded for archival reasons.
-- Draws an arc on your screen.
-- startang and endang are in degrees,
-- radius is the total radius of the outside edge to the center.
-- cx, cy are the x,y coordinates of the center of the arc.
-- roughness determines how many triangles are drawn. Number between 1-360; 2 or 3 is a good number.
function draw.Arc(cx,cy,radius,thickness,startang,endang,roughness,color)
surface.SetDrawColor(color)
surface.DrawArc(surface.PrecacheArc(cx,cy,radius,thickness,startang,endang,roughness))
end