UKismetMathLibrary::Add_IntPointInt
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureUFUNCTION
Description
Adds a scalar integer B to both the X and Y components of IntPoint A, returning a new FIntPoint. Useful for uniform padding or margin offsets.
Caveats & Gotchas
- • B is added to BOTH components equally. If you need different offsets per axis, use Add_IntPointIntPoint with an explicit FIntPoint instead.
- • Despite the comment in the header reading 'Addition (A - B)', the function correctly performs addition — the comment is a copy-paste error in the source.
Signature
static UE_INL_API FIntPoint Add_IntPointInt(FIntPoint A, int32 B); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | FIntPoint | The IntPoint to add to. | — |
| B | int32 | Scalar integer to add to both X and Y of A. | — |
Return Type
FIntPoint Example
Expand a tile index by a uniform border C++
FIntPoint TileMin(2, 3);
FIntPoint Padded = UKismetMathLibrary::Add_IntPointInt(TileMin, 1);
// Padded == (3, 4) Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?