# Why am I getting this error when trying to round a float

**URL:** <https://forums.unrealengine.com/t/why-am-i-getting-this-error-when-trying-to-round-a-float/1281517>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [September 3, 2023, 9:46am UTC](https://forums.unrealengine.com/t/why-am-i-getting-this-error-when-trying-to-round-a-float/1281517 "2023-09-03T09:46:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nelmi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nelmi/32/746978_2.png) [@nelmi](https://forums.unrealengine.com/u/nelmi)\
**Post date:** [September 3, 2023, 9:46am UTC](https://forums.unrealengine.com/t/why-am-i-getting-this-error-when-trying-to-round-a-float/1281517/1 "2023-09-03T09:46:06Z")

</div>

So I’m trying to round a float using Ceil() (rounding upwards). But it gives me this error and I don’t know how to fix that, can someone help? Tia

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/e/d/6ed54d2418c72427f9ae856f0a6ce2687959e059.png)

---

<div class="post-metadata">

**Author:** ![im\_a\_lama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/im_a_lama/32/995063_2.png) [@im\_a\_lama](https://forums.unrealengine.com/u/im_a_lama)\
**Post date:** [September 5, 2023, 10:43am UTC](https://forums.unrealengine.com/t/why-am-i-getting-this-error-when-trying-to-round-a-float/1281517/2 "2023-09-05T10:43:38Z")

</div>

`Ceil[]` is a failable function because it `<decides>` you have to call it using brackets.

Why is it failable ? I have really no clue, maybe if you ask it to Ceil() to the `int` limit it would fail ?

```auto
if(MyCeiledNumber := Ceil[MyNumber]):
    # do things

```

---

<div class="post-metadata">

**Author:** ![Ep8Script](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ep8script/32/1170494_2.png) [@Ep8Script](https://forums.unrealengine.com/u/Ep8Script)\
**Post date:** [September 5, 2023, 12:53pm UTC](https://forums.unrealengine.com/t/why-am-i-getting-this-error-when-trying-to-round-a-float/1281517/3 "2023-09-05T12:53:22Z")

</div>

It’s because `Inf`, `-Inf`, and `NaN` are floats but not valid integers

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 5, 2023, 12:53pm UTC](https://forums.unrealengine.com/t/why-am-i-getting-this-error-when-trying-to-round-a-float/1281517/4 "2023-10-05T12:53:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
