double to int conversion not working using math.h functions in c -


databuf[1] = acos(0.130f); 

this code i'm running when print out result, comes out 1 instead of 82. databuf int16_t array. other math.h functions work fine conversion trig ones don't work.

the trigonometric functions in math.h use radians, not degrees. can convert radians degrees multiplying 180 / pi, ( 57.29577951308232).

acos(0.13) return 1.440427347091751 radians multiplied 57.29577951308232 gives result of 82.53040768358306 degrees.