# exist a any methot to transform or round a float like "89.12345" to "89.12" or somthing like this

**URL:** <https://forums.unrealengine.com/t/exist-a-any-methot-to-transform-or-round-a-float-like-89-12345-to-89-12-or-somthing-like-this/1634791>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [January 22, 2024, 6:17pm UTC](https://forums.unrealengine.com/t/exist-a-any-methot-to-transform-or-round-a-float-like-89-12345-to-89-12-or-somthing-like-this/1634791 "2024-01-22T18:17:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roy2992](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roy2992](https://forums.unrealengine.com/u/Roy2992)\
**Post date:** [January 22, 2024, 6:17pm UTC](https://forums.unrealengine.com/t/exist-a-any-methot-to-transform-or-round-a-float-like-89-12345-to-89-12-or-somthing-like-this/1634791/1 "2024-01-22T18:17:26Z")

</div>

I am trying to make a drop rate system but when I use the function that pseudo-randomly gives me a float it gives me a very long float and I would like to keep it in 2 digits but I don’t know how

---

<div class="post-metadata">

**Author:** ![JamieDeGamie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JamieDeGamie](https://forums.unrealengine.com/u/JamieDeGamie)\
**Post date:** [January 22, 2024, 6:52pm UTC](https://forums.unrealengine.com/t/exist-a-any-methot-to-transform-or-round-a-float-like-89-12345-to-89-12-or-somthing-like-this/1634791/2 "2024-01-22T18:52:46Z")

</div>

I’m not sure if this is possible, but I know of the Ceil and Floor methods that can round floats up or down to the nearest whole digit

---

<div class="post-metadata">

**Author:** ![Roy2992](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roy2992](https://forums.unrealengine.com/u/Roy2992)\
**Post date:** [January 23, 2024, 8:04pm UTC](https://forums.unrealengine.com/t/exist-a-any-methot-to-transform-or-round-a-float-like-89-12345-to-89-12-or-somthing-like-this/1634791/3 "2024-01-23T20:04:18Z")

</div>

yeah, i founded but i don’t know how to use this method

---

<div class="post-metadata">

**Author:** ![EisStudios](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eisstudios/32/885240_2.png) [@EisStudios](https://forums.unrealengine.com/u/EisStudios)\
**Post date:** [January 23, 2024, 8:18pm UTC](https://forums.unrealengine.com/t/exist-a-any-methot-to-transform-or-round-a-float-like-89-12345-to-89-12-or-somthing-like-this/1634791/4 "2024-01-23T20:18:58Z")

</div>

This post should answer your question 🙂

> [@How to round float to x decimal places?](https://forums.unrealengine.com/t/how-to-round-float-to-x-decimal-places/821189/4):
>
> @ChrisAI This mostly comes down to a problem of converting between ints and floats in Verse. One thing you might have been missing is that you can multiply an int by 1.0 to turn it into a float. Here is a version of your original code with that + rounding integrated in. QuickTest():logic = if: ((Round[10.12345 \* 1000.0] \* 1.0) / 1000.0) = 10.123 then: return true else: return false I also gave a quick go at writing a more generic version RoundToDecimalPlac…

---

<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:** [February 22, 2024, 8:18pm UTC](https://forums.unrealengine.com/t/exist-a-any-methot-to-transform-or-round-a-float-like-89-12345-to-89-12-or-somthing-like-this/1634791/5 "2024-02-22T20:18:59Z")

</div>

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