[Sidefx-houdini-list] rounding off in expression
mark at sidefx.com
Tue Feb 10 18:26:35 EST 2009
On Tuesday Feb 10 at 14:02, Robert D.M. Smith wrote:
> I have a group SOP that is filtering out points based on an expression ...
> something like *if($VAR > 90, 1, 0)*
> There is a point that has a value of 89.9889 but the expression is failing
> on it ... treating it like it's 90 or greater. Any ideas on how to give it
> more precision?
/ -> set VAR = 89.9889
/ -> echo `$VAR>90`
/ -> echo `ifs( 89.9889>90, 'true', 'false')`
/ -> echo `ifs( $VAR>90, 'true', 'false')`
I can't reproduce this at all...
Here are the commands without prompts (for cut & paste)
set VAR = 89.9889
echo `ifs( 89.9889>90, 'true', 'false')`
echo `ifs( $VAR>90, 'true', 'false')`
Can you get me a command script which fails like this? Perhaps it's
treating $VAR as a string? So, maybe if you used atof($VAR)?
More information about the Sidefx-houdini-list