title: Tag Cloud Algorithm that Supports 1 Word Frequency
body: <p>I'm looking to make a Tag Cloud in Objective-C, and I'm trying to find a good algorithm. I've tried several, which, at first, seemed to work quite well, but they all had one flaw: if the word with the lowest number of occurences appeared as often as the word with the highest frequency, the whole process was flawed.</p>
  
  <p>Example (First algorithm in Google): </p>
  
  <pre><code>var multiplier = (maxPercent-minPercent)/(max-min);
  var size = minPercent + ((max-(max-(count-min)))*multiplier);
  </code></pre>
  
  <p>Here, if min = 5, max = 5, maxPercent = 300, minPercent = 75, and count = 5, then you have:</p>
  
  <pre><code>var multiplier = (300-75)/(5-5) ----- division by 0, impossible
  var size = 75 + ((5-(5-(5-5)))*multiplier);
  </code></pre>
  
  <p>So my question is, are there any Tag Cloud algorithms that take this into account, and are able to calculate each word's font size, even when the maximum frequency is equal to the minimum frequency?</p>