How can I get a specific decimal place from a value?. Material.

I want to isolate certain decimal places from pixel values in a material.
I have the float value 2.4517 , and I want to isolate the 1st and 2nd decimal places so the reulting number I get, is 45…
does anyone know how this can be done?

You can try this, it works:

Nothing too fancy but works. You can transform it into a material function where you can pass the number of digits you want to keep, ie: if 3 digits, then you will replace 100 by 1000 on both multiply and divide nodes. :wink:

Thanks. decided to attempt it myself; it turned out almost the same as yours.