Change decimal results

Hello guys ,

I wanna know if there is a mel command or a way to reduce the number of decimals on a float.

Ej. reduce 0.123456789 to 0.1234.

Thanks

Here is a procedure that truncates the decimals down to 3 places.

Hope it helps

//////////////////////////
global proc float mhTrunc(float $truncVal)
{
$truncVal *= 1000;
$truncVal = trunc($truncVal);
$truncVal = $truncVal/1000;
return $truncVal;
}
//////////////////////////////

Thanks Mike!

It works!

jpitas.