This is an example of how to use the atan2 function.
const float y_coord[] = {-1.0, -1.0, -1.0, 0.0, 1.0, 1.0, 1.0, 0.0};
const float x_coord[] = {-1.0, 0.0, 1.0, 1.0, 1.0, 0.0, -1.0, -1.0};
task main()
{
for (int i = 0; i < pts; ++i)
{
float angle =
atan2(y_coord[i], x_coord[i]);
}
while (true);
}