# formatDegrees

[**@qbead/bloch-sphere**](https://qbead.gitbook.io/bloch-sphere/index)

***

[@qbead/bloch-sphere](https://qbead.gitbook.io/bloch-sphere/index) / formatDegrees

## Function: formatDegrees()

> **formatDegrees**(`radians`, `precision`): `string`

Defined in: [src/format.ts:15](https://github.com/qbead/bloch-sphere/blob/41247d60e67bd802cc21854379a06362e5d0957c/src/format.ts#L15)

Format an angle given in radians as a string in degrees with a given precision.

### Parameters

| Parameter   | Type     | Default value |
| ----------- | -------- | ------------- |
| `radians`   | `number` | `undefined`   |
| `precision` | `number` | `2`           |

### Returns

`string`
