HapG
06-24-2008, 08:23 PM
when does Zero not equal Zero?
//get pivot
float $jX = `getAttr ($trans+".sx")`; // Result: 0 //
if( 0 != $jX )
{
print "passed\n";
}
In the following code, the attribute value is 0, but the "if" statement decides $jX and 0 aren't equal.
Is it because getAttr returns a double instead of a float? If so, how do I force $jX to be a float?
//get pivot
float $jX = `getAttr ($trans+".sx")`; // Result: 0 //
if( 0 != $jX )
{
print "passed\n";
}
In the following code, the attribute value is 0, but the "if" statement decides $jX and 0 aren't equal.
Is it because getAttr returns a double instead of a float? If so, how do I force $jX to be a float?
