daydreamier Posted June 21, 2018 Share Posted June 21, 2018 (edited) I want to get number rounding to the second decimal place. like this -1.2345 -> -1.23 i was do that in Houdini 16.0 : But I cant do that in Houdini 16.5 how can I? sorry, I did not write that I used it Font node. i'd like to use this on Font node. roundDec_example.hipnc Edited June 22, 2018 by daydreamier add information Quote Link to comment Share on other sites More sharing options...
Noobini Posted June 22, 2018 Share Posted June 22, 2018 take out the back ticks ? works fine here...But I'm puzzled why it doesn't go pass 5 dec places.....??? roundDec.hipnc Quote Link to comment Share on other sites More sharing options...
daydreamier Posted June 22, 2018 Author Share Posted June 22, 2018 sorry, I did not write that I used it Font node. i'd like to use this on Font node. roundDec_example.hipnc Quote Link to comment Share on other sites More sharing options...
Noobini Posted June 22, 2018 Share Posted June 22, 2018 ok, I showed someone how to do this awhile ago...you need to separate into integer part, decimal part...then join them with the '.' in the middle....just can't locate the post at the moment. Quote Link to comment Share on other sites More sharing options...
Noobini Posted June 22, 2018 Share Posted June 22, 2018 (edited) here it is... look in file fund_decimals, font5 node... to cut to the chase: parm : `int(ch("../../dopnet1/gravity1/forcey"))`.`abs(rint((ch("../../dopnet1/gravity1/forcey")%int(ch("../../dopnet1/gravity1/forcey")))*100))` Edited June 22, 2018 by Noobini 1 Quote Link to comment Share on other sites More sharing options...
daydreamier Posted June 25, 2018 Author Share Posted June 25, 2018 thank u for let me know that! Quote Link to comment Share on other sites More sharing options...
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.