incremental, decremental ints and clamps mind boggle

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.

any ideas? thanks for reading.

update:

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

Thanks

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

image

Oh god :laughing:

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 :rofl:

:sunglasses: :+1:

1 Like