---
name: "cos"
type: command
status: ok
groups: ["Math - Geometry"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/cos
revid: 321053
updated: 2022-05-13T12:15:18Z
---

# cos

*Command · Math - Geometry · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

## Description

Cosine of a number, argument in degrees.

## Syntax

```sqf
cos x
```

**Parameters:**

- `x`: [Number](../topics/Number.md)

**Returns:** [Number](../topics/Number.md)

## Examples

### Example 1

```sqf
cos 60; // returns 0.5
```

## See also

[acos](../commands/acos.md) · [sin](../commands/sin.md) · [asin](../commands/asin.md) · [tan](../commands/tan.md) · [atan](../commands/atan.md) · [atan2](../commands/atan2.md)

## Community notes

**Hardrock** — 2006-08-08

Be aware that there might be rounding errors in the results of this command.

```sqf
cos 90
```

for example doesn't return the expected '0', but '-4.37114e-008'. So, if you want to compare results of Cosinus, don't use the compare operator

```sqf
(cos 90) == 0
```

but rather use less than.

```sqf
(cos 90) < 0.00001
```

<sub>Source: [BI Community Wiki — cos](https://community.bistudio.com/wiki/cos) (revision 321053).</sub>
