« ..oops | Main | Maya Composite 101 - Part 2 »

14/09/2009

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

I like the way you represent the whole concept.

This is a built-in function called by the Python print statement to compute the “informal” string representation of an object.

python ("round (1.555, 1)")
// Result: 1.6 //

See :

mayastation.typepad.com/maya-station/2009/07/rounding-floats-into-integers.html

I'll add your comment to that post. Thanks.

Owen

Hello, thanks for the python goodness

If you happen to talk to some random guy/girl working on mel, can you please ask for a 'rounding' function instead of having to write something such as:

proc float round(float $val,float $dec){
    $sign = `sign $val`;
    float $dec = `pow 10 $dec`;
    $val = (int) (($val + $sign*5/($dec*10)) * $dec);
    $val = ($val / $dec);
    return $val;
}

each time i want to round a number

Nice :) Great stuff - very usefull.

And Welcome! Looking forward to more post you.

But for AutoDesk in general, throw some energy in fixing Maya on Snow Leopard before anything else!

The comments to this entry are closed.

RSS Feed

  • Subscribe

Share

  • Bookmark and Share