---
url: /api/kiln/functions/distSq.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / distSq

# Function: distSq()

```ts
function distSq(a, b): number;
```

Squared distance between two points; compare against radius² to avoid a sqrt.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `a` | `Readonly`<[`Vec3`](../interfaces/Vec3.md)> |
| `b` | `Readonly`<[`Vec3`](../interfaces/Vec3.md)> |

## Returns

`number`
