COS() function

SELECT COS( X )
X is in Radian

COS() with PI()

mathematical constant PI() (π) value is 3.141593
SELECT COS(PI()); // Ouput is -1
SELECT ROUND(COS(PI()/2),2); // Ouput is 0.00
SELECT ROUND(COS(PI()/3),2); // Ouput is 0.5 
We used ROUND() to show only two decimal places.

COS() with RADIANS

Radians function convert degree value to radian.

SELECT COS(RADIANS(0)); // Ouput is 1
SELECT ROUND(COS(RADIANS(90)),2); // Output is 0.00
SELECT COS(RADIANS(180)); // Output is -1
Your Rating




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