UKismetMathLibrary::FCeil
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPureUFUNCTION
Description
Rounds A up towards positive infinity, returning the smallest integer greater than or equal to A. -1.6 becomes -1 and 1.6 becomes 2.
Caveats & Gotchas
- • Returns int32 — values outside [-2147483648, 2147483647] overflow silently. Use FCeil64 when the input could be a large double.
- • Blueprint displays this node as 'Ceil', not 'FCeil'. The F prefix is a naming artifact from when the functions accepted float rather than double.
Signature
static UE_INL_API int32 FCeil(double A); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| A | double | The floating-point value to ceil. | — |
Return Type
int32 Example
Determine the minimum number of inventory slots needed C++
int32 ItemCount = 25;
int32 SlotSize = 8;
int32 SlotsNeeded = UKismetMathLibrary::FCeil((double)ItemCount / SlotSize); // returns 4 Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?