<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Rect3DFloat/formInset(by:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "s:So13SPRect3DFloata7SpatialE9formInset2byySo07SPSize3B0a_tF"
  },
  "title" : "formInset(by:)"
}
-->

# formInset(by:)

Insets the rectangle by the specified size.

```
mutating func formInset(by dXYZ: Size3DFloat)
```

## Parameters

`dXYZ`

The inset amount.

## Discussion

This function insets the rectangle by the specified values on each axis. The origin value is offset by
the distance specified by the `dXYZ` parameter. The size is adjusted by `(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)