Data Science, Data Visualization, R.
function(perc){ angle = -1 if(perc < 0.25) # 1st q [90,0] angle = 90 — (perc/0.25) * 90 else if(perc < 0.5) # 2nd q [0, -90] angle = (perc-0.25) / 0.25 * -90 else if(perc < 0.75) # 3rd q [90, 0] angle = 90 — ((perc-0.5) / 0.25 * 90) else if(perc < 1.00) # last q [0, -90] angle = ((perc -0.75)/0.25)