tags:

views:

31

answers:

1

how can i use cosine and sine in my iphone application to find the missing value of angles? if i have a float that contains a number, how can i get the cosine of that angle. i used this example however it gave me errors

        double x1float = (cos(pfloat));
A: 

What error does it give you? Did you include math.h, assuming this is C code?

Michael Goldshteyn
... and link against libm? (`-lm` on the link step command line)
Rup
i did include <math.h>it says expected expression before double
Alx