title: Calculations for displaying percentage of budget remaining
body: <p>I have a just added a circular progress bar to my app that I intend to use to display the percentage of a users budget that they have spent.</p>
  
  <p>I have been struggling to figure out how I would convert the current budget calculation into a percentage to use to configure the progress circle. Basically, I have a total expenditure counter (outgoings) and a total credit counter (incomings) and I need to turn this into a number such as 0.134 for the progress circle, and I also need to figure out what percentage has been spent.</p>
  
  <p>Here is an image of my progress circle:</p>
  
  <p><img src="https://i.stack.imgur.com/WY7IK.png" alt="enter image description here"></p>
  
  <p>This is my code for calculating the current budget:</p>
  
  <pre><code>currentBudgetCalculation = currencyDouble + totalCreditCounter - totalSpendingsCounter
  </code></pre>
  
  <p>currencyDouble is the initial budget, totalCreditCounter is the the total incomings and totalSpendingsCounter is the total outgoings.</p>
  
  <p>What calculation would I need to do to get this working? The variable for inputing the progress circle value is a CGFloat.</p>