Separate values before and the rest including decimal in Grasshopper

Hi all,
I am trying to separate values before the decimal point and the remaining values to perform different operations. But I have no clue how to do that!

Does anyone know?
Thanks.

The file and screenshot are attached here.
Separate Values before and after the decimal palce.gh (4.6 KB) Separate%20Values%20before%20and%20after%20the%20decimal%20palce

HI Zohaibneduet

You can use the “Text Split” component.like this

Thanks @603419608 it is quit helpful.

But I am wondering is there any way to include the decimal point as well?

like this?

No,
I mean like
12 and 0.345 ?

1 Like

@603419608 Thanks a lot :slight_smile:

There are many ways to do this, a cute way is using modulus of 1.
Also if you find you want some more control of your rounding tools there are some useful functions in Pufferfish, like round decimal place.

I actually have a deconstruct number component there if you find it useful.

1 Like