title: Drawing a partial circle
body: <p>I'm writing a program that will take a number between 0 and 1, and then spits out a circle (or arc I guess) that is completed by that much.</p>
  
  <p>So for example, if 0.5 was inputted, the program would output a semicircle</p>
  
  <p>if 0.1, the program would output a tiny little arc that would ultimately be 10% of the whole circle. </p>
  
  <p>I can get this to work by making the angle starting point 0, and the angle ending point <code>2*M_PI*decimalInput</code></p>
  
  <p>However, I need to have the starting point at the top of the circle, so the starting point is <code>3*M_PI_2</code> and the ending point would be <code>7*M_PI_2</code></p>
  
  <p>I'm just having trouble drawing a circle partially complete with these new starting/ending points. And I'll admit, my math is not the best so any advice/input is appreciated</p>
  
  <p>Here is what I have so far</p>
  
  <pre><code>var decimalInput = 0.75 //this number can be any number between 0 and 1
  let start = CGFloat(3*M_PI_2)
  let end = CGFloat(7*M_PI_2*decimalInput)
  
  let circlePath = UIBezierPath(arcCenter: circleCenter, radius: circleRadius, startAngle: start, endAngle: end, clockwise: true)
  
  circlePath.stroke()
  </code></pre>
  
  <p>I just cannot seem to get it right despite what I try. I reckon the end angle is culprit, unless I'm going about this the wrong way</p>