RADIANS() to convert degree to radian

SELECT RADIANS( X );
Value of X is in degree.
SELECT RADIANS( 180 ); // Output is 3.14159265358979
SELECT RADIANS( 90 ); // 1.5707963267949
We can use round() to limit the decimal places.
SELECT ROUND(RADIANS( 45 ),2); // Output is 0.79

RADIANS with SIN(), COS()

SIN(), COS() and other functions take radian are input. So we can convert any degree value by converting radians first and then get the output.
SELECT SIN(RADIANS(90)) // Output is 1 
SELECT SIN(RADIANS(0)); // Output is 0
SELECT ROUND(SIN(RADIANS(180)),2) // Output is 0.00
SELECT COS(RADIANS(0)); // Output is 1
SELECT COS(RADIANS(180)); // Output is -1


plus2net.com



Post your comments , suggestion , error , requirements etc here .










We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer