# incremental, decremental ints and clamps mind boggle

**URL:** <https://forums.unrealengine.com/t/incremental-decremental-ints-and-clamps-mind-boggle/1834663>\
**Category:** Blueprint\
**Tags:** UE-5, HTML5, unreal-engine, question, UE503\
**Created:** [May 1, 2024, 12:55pm UTC](https://forums.unrealengine.com/t/incremental-decremental-ints-and-clamps-mind-boggle/1834663 "2024-05-01T12:55:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skyboy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Skyboy](https://forums.unrealengine.com/u/Skyboy)\
**Post date:** [May 1, 2024, 12:55pm UTC](https://forums.unrealengine.com/t/incremental-decremental-ints-and-clamps-mind-boggle/1834663/1 "2024-05-01T12:55:22Z")

</div>

Hey there, quick one today.

I feel a bit silly asking about this, but even with a clamp my incremental and decremental ints are going to -1 and 1 over.

How come the clamp doesn’t stop this from happening? Itd make life so much easier to just have it fix to the clamp.

Bringing it by one on either side gives weird side effects such as missing a number when first using it.

 ![Unreal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/6/0963a5d6c3ab5e8a2a7730c70c7ef5fb500d3360.jpeg)

any ideas? thanks for reading.

update:

 ![Unreal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/c/7cca4ce8d01a3b664de007ee23047bb92ba7376c.jpeg)

Disspointed but this works equally well. if anyone has any info on this itd be nice to learn something today.

Thanks

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 1, 2024, 1:12pm UTC](https://forums.unrealengine.com/t/incremental-decremental-ints-and-clamps-mind-boggle/1834663/2 "2024-05-01T13:12:27Z")

</div>

You have to clamp _after_ addition/subtraction. You don’t get a chance to do that with ++

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/5/7/957302f10ec58c2203bbdd8eef904347145552e7.png)

---

<div class="post-metadata">

**Author:** ![Skyboy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Skyboy](https://forums.unrealengine.com/u/Skyboy)\
**Post date:** [May 1, 2024, 1:16pm UTC](https://forums.unrealengine.com/t/incremental-decremental-ints-and-clamps-mind-boggle/1834663/3 "2024-05-01T13:16:50Z")

</div>

Oh god 😆

I knew I was going to feel silly.

So my clamp there is actually doing absolutely nothing, Ive fixed it. Lol

It makes sense, thanks for such a rapid response to my denseness 🤣

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [May 1, 2024, 1:17pm UTC](https://forums.unrealengine.com/t/incremental-decremental-ints-and-clamps-mind-boggle/1834663/4 "2024-05-01T13:17:27Z")

</div>

🕶 👍

---

<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:** [May 31, 2024, 1:18pm UTC](https://forums.unrealengine.com/t/incremental-decremental-ints-and-clamps-mind-boggle/1834663/5 "2024-05-31T13:18:20Z")

</div>

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