title: NSNumberFormatter and rounding percentage value
body: <p>here is my code snip, i dont know how to round double numbers.</p>
  
  <pre><code>double m =  [tmpProduct.msrp doubleValue] ;
  double d = [tmpProduct.discountPrice doubleValue];
  double p = (d * 100 ) / m;
  </code></pre>
  
  <p>here tmpProduct.msrp and mpProduct.discountPrice are (NSDecimalNUmber *)</p>
  
  <p>from the operation above I got p = 44.995757</p>
  
  <p>i want to convert it to (45%) , how do i do that?</p>
  
  <p>here is what i use , but that does not help.</p>
  
  <pre><code>NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
  [formatter setMaximumFractionDigits:2];
  [formatter setRoundingMode: NSNumberFormatterRoundDown];
  [formatter stringFromNumber:[NSNumber numberWithDouble:p]]
  </code></pre>