Remove 0's after decimal


#1

I am having an issue with my list.chop not working and I think it has something to do with the number I am inputting, it has 0’s after a decimal (image below) is there a way to get the 0’s to be removed?

 

Thanks,

 

2016-01-13 15_43_14-Dynamo


#2

pass it through an integer.


#3

The node should work for both integer and double numbers. Are you sure the problem’s not in your “list” input?


#4

Konrad-

Can you expound on what you mean by “Pass thru an Integer”? See image below - it seems like even nodes that are supposed to produce an integer (Math.Round) will result in a Double rather than an integer , even when an integer is passed into them.


#5

Works well in both 0.9.1 and 1.0.

In 0.8.2 the output is inaccurate.


#6

I’m in 9.0


#7

KONRAD K SOBON thank you sir the integer was what I needed. Here are my results with the three of the “Math” nodes.


#8

 


#9

Tomek,

Dzieki za przyklad. Ja bym tylko dodal ze twoja funkcja to odpowiednik math.floor(). :slight_smile: Niektorzy moga byc zaskoczeni jak zobacza ze int(1.8) to 1.