Odd Automatic Rounding Issue with Python Script


I have come across an odd problem with dynamo’s python.
The problem is best displayed in line 19, if I divide 7 by 2 it gives an answer of 3, not 3.5

This problem is in other parts of the script as well.
Any help or suggestions are appreciated. Thanks

I’ve never noticed this before but apparently Python won’t convert types that way. The problem is you’re telling it to divide an integer by an integer and is therefore returning an integer. Change at least one of the values to a double and it will return a double.