Closed BenziAhamed closed 8 years ago
Hi, thank you for contributing! I like the way you implemented it. I do have a few remarks/questions though:
NewtonMethodSolvable
, so it would be best to use those to be consistent. I can change that after merge, so you don't need to fix that.One small thing: please add your name to the copyright comments at the top of the file.
Since there were a lot of things that would have had to change, I changed my current implementation to be generic using my own protocols. I still have to write some additional tests for the other types, and I still need to add CGFloat
to adopt my own protocols... This is the commit that implements Solver
generically: ba1d040 I'll implement CGFloat
and close the pull request then. 😄
CGFloat
now complies to all the protocols, so it can be used in all generic parts now. See commit b07d919. I'll close this pull request now. If you want to know how I implemented all the protocols, you can take a look in Math.swift
and in the Protocols
group in the Xcode project. Thanks for using MathEagle and contributing to it!
I was trying to use the Solver.newton methods and found that it wasn't generic to handle Double, Float, CGFloat etc. I ended up implementing it this way. Do you think it would be worthwhile to update the code as illustrated?