Michael Knoepfle Posted November 13, 2015 Share Posted November 13, 2015 In what syntax do I have to enter the arg if I want to convert a number of decimal places. It does not work. Python arguments like {:.2f} or %1.2f does not works with the format string note. Thank you for answer Mike Quote Link to comment
benAU Posted November 13, 2015 Share Posted November 13, 2015 what if… (this may sound dumb(or be dumb!), so apologies in advance) say you wanted 3 decimal places. 1. multiply number by number of powers 2. covert to integer 3. convert to real number 4. divide by number of powers so, say 14.235678465…… x 1000 = 14235.678465…… convert to integer = 14235 convert to real number = 14235.0... /1000 = 14.235 a little bit clunkerty but... Quote Link to comment
rDesign Posted November 13, 2015 Share Posted November 13, 2015 What about creating a custom node and using Python's standard 'Decimal' module? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.