Bug in MathRound

Hi vvvvsers,

i am a little bit confused about the usage of the MathRound (value) node that comes with the addonpack…
Can somebody explain that behaviour to me ?

Is it a feature or is it a bug ?? ;)



Ahhh, understand…

i dont like the bankers, so i build my own rounding node ;)

Thanks bjoern…

BTW: i dont think that the most user of vvvv would expect such a behaviour ?!

instead of creating your own consider adding the a Midpoint Rounding enum to the node and contribute your change back to the addonpack.

i think it was even quicker to write a new V2 plugin for that

will add it to the addonpack

maybe like this?

v3… no text …

ValueRound.7z (6.6 kB)

ja and set the old one to “legacy”.

only bad thing is, that this node (even in its simplest form, like the first one) is slower than björns. is that because of V1 vs. V2?

maybe you should use IDiffSpread and only do the rounding if the pins are changed. and also consider switch/case instead of if/else (don’t know if it will be faster but looks nicer :)

hehe, i tried switch case, but using it with enums confused me a bit. will give that another try.

the diffspread thing sounds reasonable. thanks