0

I'm trying to divide in this case 5/10 using NSExpression but it returns 0 instead of 0.5.

let expn = NSExpression(format:"5/10")

let answer = expn.expressionValueWithObject(nil, context: nil) as? NSNumber

And Ideas?

Chad Gregory
  • 118
  • 4
  • 11

0 Answers0