davedelong / DDMathParser

String → Number
MIT License
854 stars 153 forks source link

Update _DDFunctionEvaluator.m #100

Closed SheffieldKevin closed 9 years ago

SheffieldKevin commented 9 years ago

Added the atan2 function.

davedelong commented 9 years ago

This looks great! What do you think about an implementation in the Precision evaluator as well?

SheffieldKevin commented 9 years ago

I've not looked at the precision evaluator as I have not needed it, but I would guess for consistency it is probably a good idea.

SheffieldKevin commented 9 years ago

Implementation based on wikipedia atan2 looks not to bad which would just build on your DDDecimalAtan function. I'm not sure how comfortable I would be doing it as I would not then be using it and it would remain untested..

SheffieldKevin commented 9 years ago

I have added the NSDecimal version of Atan2. It is not tested. I couldn't see any tests that related to the NSDecimal implementation & I've never used SenTestKit. I leave it to your discretion to include or not.

davedelong commented 9 years ago

I've put atan2 into the 2.0 branch, which will be merged into master soon.