---
title: "distanceSquared(toPoint:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/boundingbox/distancesquared(topoint:)"
---

# distanceSquared(toPoint:)

Calculates the distance from a point to the bounding box.

## Declaration

```swift
func distanceSquared(toPoint: SIMD3<Float>) -> Float
```

## Parameters

- `toPoint`: The point.

## Return Value

Return Value The square of the distance, in meters, from the point to the box.
