Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am working on a code that requires me to embed trignometry formula. actually i have the formula but i am confused how to implement that into my code.i am trying to find out everywhere & i am getting too but not getting exactly what i need.the formula is like

Axh = Ax cos θz 
Ayh = Ay cos θy

|AI | =sqrt(|Axh|^2 + |Ayh|^2)

α = arccos(Axh/|AI|) β = arccos(Ayh/|AI |)

Alat =Axh sin α+ Ayh sin β


these are formulas so anyone out there can help me with geometric coding or any simple project from where i can learn.. thanks
Posted
Updated 13-Sep-11 1:20am
v2

Have a look at this article where I had a bunch of formula, and had to translate to code, ok, its not objective-c, but might give you ideas on the task.

Remember, keep it simple and break each part down to its component parts.

Data Historians - You Bought It, Use It! Real World Example[^]
 
Share this answer
 
AFAIK Objective C has the same mathematical functions of the C programming language, hence you have all you need (have a look at math.h header).
For instance first line would be
C
double Axh = Ax * cos(Thetaz)

and so on.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900