Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
rotation
//g++ 4.9.3 #include <iostream> #include <math.h> static const float deg2rad = M_PI / 180.0; static const float rad2deg = 180.0 / M_PI; float NormalizeAngle(float angle){ double intpart; float outAngle = modf(angle/(2*M_PI), &intpart)*2*M_PI; if (outAngle < 0) outAngle += 2*M_PI; return outAngle; } int main() { float B = 0; float Y = 10*deg2rad; float U = NormalizeAngle(B-Y); if (U > M_PI) U -= 2*M_PI; std::cout << U*rad2deg; }
run
|
edit
|
history
|
help
0
MyStack
aa
segmentedSieveR
stack and queue
Area of a triangle using templete
Function to m_function
e-olymp.com---problem1590---Birthday 2
1068 - Investigation
function pointer overload
Elevator 3