Hello everyone,
Here is a simple abstraction to round numbers, both positive and negative, using only vanilla-friendly objects: round.zip
Best,
Gilberto
simple abstraction to round numbers
Hello everyone,
Here is a simple abstraction to round numbers, both positive and negative, using only vanilla-friendly objects: round.zip
Best,
Gilberto
Very nice! I'm sure I'll find a use for this. Would you consider putting a cold inlet on the right, just like the [int] object?
Also, why is {+ 0.5] actually [+ 0.499999999]?
Hi @LiamG (new avatar, took me a while to recognize you )
Thanks for the suggestions, here is the new version with a cold inlet as well: round.zip
As for the [+ 0.5] actually being [+ 0.4999999999999], pd truncates the value visually, but it saves the correct value on the memory. So that is just about displaying, thus is a difference between simply typing [+ 0.5] and using those [+ 0.5] from my patch.
Take care and thanks for the feedback!
Gilberto
Those comparisions and spigots can be eliminated, here is simpler version:
round.pd
Bye.
_xb
@xbarbie that's indeed much better. thanks for the improvements!
Take care,
Gilberto
Here is another solution to the rounding problem, which uses only [makefilename] and [fromsymbol] (look for the 7th post, by @sdaau_ml):
Oops! Looks like something went wrong!