I want to use arctan() in my roborio C++ program but don’t know what header file to include.

#include <math.h>

is not working for me. Can someone help?


#include <cmath>

std::atan or std::atan2 (recommended) should work.

That’s got it. Thanks.

+1 for atan2() - IE the “atan that software people want”.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.