COS

COS(number)

Returns the cosine of an angle in radians (Double).


numberThe number you want the cosine of in radians (Double).

REMARKS
* The "number" can be any numeric expression representing an angle in radians.
* This function takes an angle and returns the ratio of two sides of a right angled triangle.
* The cosine ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse.
* The value returned is between -1 to 1.
* If your argument is in degrees, multiple it by PL/180 to convert it to radians.
* If your argument is in radians, multiply it by 180/PI to convert it to degrees.
* You can use the SIN function to return the sine of a number.
* You can use the TAN function to return the tangent of a number.
* The inverse of this function is called the arc-cosine.
* The equivalent Excel function is Application.WorksheetFunction.COS
* The equivalent .NET function is System.Math.Cos
* For more information, refer to the [[Trigonometry > Cos Function]] page.
* For the Microsoft documentation refer to learn.microsoft.com

Debug.Print Cos(0)             '=  
Debug.Print Cos(0.5) '=
Debug.Print Cos(1) '=
Debug.Print Cos(-1) '=
Debug.Print Cos(23) '= -0.53
Debug.Print TypeName(Cos(23)) '= "Double"

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top