Calculate atan2 without std functions or C99

前端 未结 4 1747
遥遥无期
遥遥无期 2021-01-03 06:09

I am calculating angles from a 3-axis accelerometer, but my compiler doesn\'t have a atan or atan2 function. It has a reserved memory slot, but it calls a function i can\'t

4条回答
  •  粉色の甜心
    2021-01-03 06:23

    The actual implementations of the math functions (or stubs to the HWFPU if one exists) should be in libm. With GCC this is indicated by passing -lm to the compiler, but I don't know how it is done with your specific tools.

提交回复
热议问题