How Could I only keep decimal part of a number?

In Grasshopper , I want to have the decimal part of many numbers. How could I do this?

I know that round up command will get rid of all decimal part of numbers, I want the opposite: i want to keep the decimal part of number. I forget how to do it.

Thanks

You can round to the floor integer. Then do the original number minus the floor integer.

If you want one component Pufferfish has a deconstruct number component that will get you the decimal part.


Deci.gh (10.8 KB)

Hi,
I think this is what you are looking for and Happy New Year

Decimal part.gh (9.5 KB)

Hi,
I think this is what you are looking for and Happy New Year


Decimal part.gh (11.4 KB)

Shaolianghua - You could try using Modulus.
Michael - Pufferfish has some amazing components - thank you.
Happy new year.
Drew

2 Likes

@Drew This is absolutely simple and sweeet. love it…

1 Like