UKismetMathLibrary::Subtract_IntPointInt
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureUFUNCTION
Description
Subtracts scalar B from both X and Y of IntPoint A, returning a new FIntPoint. Useful for applying a uniform inset or border reduction.
Caveats & Gotchas
- • B is subtracted from BOTH components equally. For per-axis subtraction, pass an FIntPoint to Subtract_IntPointIntPoint instead.
- • Negative values of B are valid and effectively perform addition; name the variable clearly to avoid confusion when reading the call site.
Signature
static UE_INL_API FIntPoint Subtract_IntPointInt(FIntPoint A, int32 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FIntPoint | The IntPoint to subtract from. | — |
| B | int32 | Scalar integer to subtract from both X and Y of A. | — |
Return Type
FIntPoint Example
Shrink a grid region by a uniform margin C++
FIntPoint Size(10, 8);
FIntPoint InnerSize = UKismetMathLibrary::Subtract_IntPointInt(Size, 2);
// InnerSize == (8, 6) Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?