The Stanford iOS dev seminar suggests I uses “the normal BSD Unix C” library for calculating sine and cosine. While I can calculate those values on my own just fine, I’m trying to learn more about implementing external libraries.
Where is this library? Is it included by default?
Cheers!
I believe they’re just talking about the
sinandcosfunctions included in the standardmath.hheader. You can simply addto the top of your implementation file, then call
sinandcos(with radian arguments). See this reference for function definitions.Edit: Apparently, the default
Foundationimport includesmath.h, so the#importabove isn’t necessary. I’m only leaving it here for future reference.