From Clomosy Docs
ClomosyAdmin (talk | contribs) No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| Line 31: | Line 31: | ||
<h2> See Also </h2> | <h2> See Also </h2> | ||
* [[System_Library#Math_Functions | Math Functions]] | * [[System_Library#Math_Functions | Math Functions]] | ||
{{#seo:|title=Cos Using in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=Use the Cos function in Clomosy to calculate the cosine of an angle in radians, essential for trigonometric operations.}} | {{#seo:|description=Use the Cos function in Clomosy to calculate the cosine of an angle in radians, essential for trigonometric operations.}} | ||
Latest revision as of 14:34, 24 December 2024
function Cos(const X: Extended): Extended;
Calculates the cosine of an angle.
In Clomosy code, Cos returns the cosine of the angle X.
X is a real-type expression that represents an angle in radians.
PI radians = 180 degrees
Example
var
floatValue : single;
const
PI = 3.14;
{
// The Sine of 60 degrees = 0.5
floatValue = Cos(PI/3); // = 180/3 = 60 degrees
ShowMessage('Cos(PI/3) = '+FloatToStr(floatValue));
}
Output:
Cos(PI/3) = 0,500459689008206