# cornerRadius

function in `@dioramajs/diorama/kit`

```ts
import { cornerRadius } from '@dioramajs/diorama/kit'
```

The radius of the corner `point` is nearest to, for `point` from the box centre with y up and
`corners` the four radii of `radii` (top left, top right, bottom right, bottom left), for a
`roundedBox` with corners that differ.

```ts
function cornerRadius(point: Node<'vec2'>, corners: Node<'vec4'>): Node<'float'>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `point` | `Node<'vec2'>` |  |
| `corners` | `Node<'vec4'>` |  |

Also exported from `@dioramajs/effects/kit`.

Defined in [packages/effects/src/kit.ts](https://github.com/MasterKurosava/diorama/blob/main/packages/effects/src/kit.ts#L555).
