<div class="meta" robots="noindex">

</div>

Method

# Xojo.Math.Cos

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Cos</api/math/cos>` as a replacement.

</div>

## Description

Returns the cosine of the specified value.

## Sample code

Gets the cosine of a 45 degree angle:

``` xojo
Using Xojo.Math

Dim angle As Double = 45 * (Pi/180) ' Convert 45 degrees to radians
Dim value As Double
value = Cos(angle) ' value = 0.707
```

## Compatibility

All project types on all supported operating systems.
