<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Rect3DFloat/inset(by:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "c:@F@SPRect3DFloatInset#$@SA@SPRect3DFloat#$@UA@SPSize3DFloat#"
  },
  "title" : "inset(by:)"
}
-->

# inset(by:)

```
func inset(by dXYZ: Size3DFloat) -> Rect3DFloat
```

## Parameters

`dXYZ`

A size structure that specifies the inset amount.

## Discussion\abstract Returns a new rectangle with the size updated by the specified amount and the same center point.
\discussion This function returns a new rectangle that’s inset by the specified values on each axis.
The origin value is offset by the distance specified by the @p dXYZ parameter.

The size is adjusted by @p (2*dXYZ) , relative to the source rectangle. If the width, height, or depth
are positive values, then the rectangle’s size is decreased on that dimension.  If width, height, or depth
are negative values, the rectangle’s size is increased on that dimension.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)