ArrayArrayArrayArray
BrainModularBrainModular Users Forum2016-10-15T14:55:12+02:00https://www.brainmodular.com/forums/app.php/feed/topic/55422016-10-15T14:55:12+02:002016-10-15T14:55:12+02:00https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36045#p36045Statistics: Posted by oli_lab — 15 Oct 2016, 14:55
]]>
2016-10-15T14:33:10+02:002016-10-15T14:33:10+02:00https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36044#p36044 by the way i dlike to format a float ie
1.23456 become
int 1 .x 1.2 .xx 1.23 .xx 2.235 ect
i found printf or setprecision commands in cpp usually refered to do that task but as far i i undestand it only affect a printed string representation of the float, not the float itself.
so what i do for now ie ie multiply input float by 10, round it, and then redivide by 10, or 100, 1000 ect depending whanted precision, that works but feel it's not the best way to proceed. any ideas? Is there a cpp command to achieve this directly on the float itself?
]]>2016-10-15T10:22:10+02:002016-10-15T10:22:10+02:00https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36042#p36042Statistics: Posted by oli_lab — 15 Oct 2016, 10:22
]]>2016-10-15T00:19:01+02:002016-10-15T00:19:01+02:00https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36041#p36041 for exemple let's say there is an output parameter as a ptDataField
onGetParamInfo it's set to a 3 digit float precision using pParamInfo->Format = "%.3f";
then let's say on the code i later say i only need an integer precision, so something that would update it back to Format = "%.0f"; for exemple
don't think it's possible yet but just wanna be sure to avoid searching^^
]]>BrainModularBrainModular Users Forum2016-10-15T14:55:12+02:00https://www.brainmodular.com/forums/app.php/feed/topic/55422016-10-15T14:55:12+02:002016-10-15T14:55:12+02:00https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36045#p36045Statistics: Posted by oli_lab — 15 Oct 2016, 14:55
]]>2016-10-15T14:33:10+02:002016-10-15T14:33:10+02:00https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36044#p36044 by the way i dlike to format a float ie
1.23456 become
int 1 .x 1.2 .xx 1.23 .xx 2.235 ect
i found printf or setprecision commands in cpp usually refered to do that task but as far i i undestand it only affect a printed string representation of the float, not the float itself.
so what i do for now ie ie multiply input float by 10, round it, and then redivide by 10, or 100, 1000 ect depending whanted precision, that works but feel it's not the best way to proceed. any ideas? Is there a cpp command to achieve this directly on the float itself?
]]>2016-10-15T10:22:10+02:002016-10-15T10:22:10+02:00https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36042#p36042Statistics: Posted by oli_lab — 15 Oct 2016, 10:22
]]>2016-10-15T00:19:01+02:002016-10-15T00:19:01+02:00https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36041#p36041 for exemple let's say there is an output parameter as a ptDataField
onGetParamInfo it's set to a 3 digit float precision using pParamInfo->Format = "%.3f";
then let's say on the code i later say i only need an integer precision, so something that would update it back to Format = "%.0f"; for exemple
don't think it's possible yet but just wanna be sure to avoid searching^^