## TO_DEGREES

The `TO_DEGREES` function in ES|QL is used to convert a number in radians to degrees.

### Syntax

`TO_DEGREES(number)`

#### Parameters

- `number`: This is the input value. It can be a single or multi-valued column or an expression.

### Examples

Here are a couple of examples of how you can use the `TO_DEGREES` function in ES|QL:

```esql
ROW rad = [1.57, 3.14, 4.71]
| EVAL deg = TO_DEGREES(rad)
```

In this example, the `TO_DEGREES` function is used to convert the values in the `rad` array from radians to degrees.

```esql
FROM my_index
| EVAL angle_deg = TO_DEGREES(angle_rad)
```

In this example, the `TO_DEGREES` function is used to convert the values in the `angle_rad` field from radians to degrees and the result is stored in the `angle_deg` field.