Problem with float round/floor

Hello everyone!

I have a weird problem with a seemingly easy task.

I have this Float variable (with the value “10”) which I want to multiply by a random float between 0.75 and 1.25. Then I want to either round it or floor it so I get a whole number without decimals.

When I test it out with a few Print Strings I get these weird results that dont match up (as you can see in the screenshots). What could be the issue here?

Thanks in advance!

93177-u2.png

Round produces the desired behavior - what do you perceive to be a “problem”?

Shouldn’t it round “11.653873” to “11” instead of “9”?

You get a new random float on every Print String so your Test case operates on a different number every time. After your Multiplication drag the float directly in all 3 Print Strings you will See its a different number all the time.

If the input float was “11.65…” it would be 12. But see the answer below, you’re not comparing oranges with oranges.