hi
has anyone ever managed to get trigonometric functions like sin cos or atan
to work using only mathf.h / libmf.a included with prc-tools or the build-in
functions? (with help from john) i got sqrt to work but the trigonometrics
always give 0 (prc-tools2.1, random crap value with prc-tools2.0).

is there some kind of initialization needed?
i'm trying to do this from within a hack, just in case it matters...
i know about mathlib but i would like to do it this way.

every help apreciated,
thanks,
felix


this code always gives me 0 for v:

      #define pi 3.14159
        float v, t1;

        t1=1;

        v=atan(t1);

        //v is 0 now but should be 0,78539816339744830961566084581988

        v=(v*180)/pi;   //v in grad

        //v is still 0 but should be 45

        #ifdef debug
            StrIToA(outputstringarray,(Int16) t1);

            StrIToA(outputstringarray2, (Int16)v);
            StrCat(outputstringarray, ", ");
            StrCat(outputstringarray, outputstringarray2);
            //Char *StrCat (Char *dst, const Char *src)

            screenshout(outputstringarray);
        #endif




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to