ArrayArrayArrayArray BrainModular BrainModular Users Forum 2016-10-15T14:55:12+02:00 https://www.brainmodular.com/forums/app.php/feed/topic/5542 2016-10-15T14:55:12+02:00 2016-10-15T14:55:12+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36045#p36045 <![CDATA[Update a param setting]]> Statistics: Posted by oli_lab — 15 Oct 2016, 14:55


]]>
2016-10-15T14:33:10+02:00 2016-10-15T14:33:10+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36044#p36044 <![CDATA[Update a param setting]]>
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?

Statistics: Posted by 23fx23 — 15 Oct 2016, 14:33


]]>
2016-10-15T10:22:10+02:00 2016-10-15T10:22:10+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36042#p36042 <![CDATA[Update a param setting]]> Statistics: Posted by oli_lab — 15 Oct 2016, 10:22


]]>
2016-10-15T00:19:01+02:00 2016-10-15T00:19:01+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36041#p36041 <![CDATA[Update a param setting]]>
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^^

Statistics: Posted by 23fx23 — 15 Oct 2016, 00:19


]]>
BrainModular BrainModular Users Forum 2016-10-15T14:55:12+02:00 https://www.brainmodular.com/forums/app.php/feed/topic/5542 2016-10-15T14:55:12+02:00 2016-10-15T14:55:12+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36045#p36045 <![CDATA[Update a param setting]]> Statistics: Posted by oli_lab — 15 Oct 2016, 14:55


]]>
2016-10-15T14:33:10+02:00 2016-10-15T14:33:10+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36044#p36044 <![CDATA[Update a param setting]]>
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?

Statistics: Posted by 23fx23 — 15 Oct 2016, 14:33


]]>
2016-10-15T10:22:10+02:00 2016-10-15T10:22:10+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36042#p36042 <![CDATA[Update a param setting]]> Statistics: Posted by oli_lab — 15 Oct 2016, 10:22


]]>
2016-10-15T00:19:01+02:00 2016-10-15T00:19:01+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=5542&p=36041#p36041 <![CDATA[Update a param setting]]>
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^^

Statistics: Posted by 23fx23 — 15 Oct 2016, 00:19


]]>