Re: clamp in MEL ... XSI expression equivalent contined..

Date : Sun, 02 Oct 2005 19:03:09 -0700
To : XSI(at)Softimage.COM
From : Adam Sale <adamsale(at)shaw.ca>
Subject : Re: clamp in MEL ... XSI expression equivalent contined..
that ones a little cleaner. Thanks Nick.
----- Original Message ----- From: "Nick" <nick.petit(at)gmail.com>
To: <XSI(at)Softimage.COM>
Sent: Saturday, October 01, 2005 10:14 PM
Subject: Re: clamp in MEL ... XSI expression equivalent contined..



or shorter still:
MAX( MIN(slider.kine.local.posy , 10 ) , 0 )

On 10/2/05, Adam Sale <adamsale(at)shaw.ca> wrote:

well, I also found this alternative that works, but its still a lot longer
than the clamp function...




cond( slider.kine.local.posy < 0 , MAX( slider.kine.local.posy , 0 ) , MIN(
slider.kine.local.posy , 10 ) )


as compared to the original..

cond( slider.kine.local.posy < 0, 0, cond( slider.kine.local.posy > 10, 10,
slider.kine.local.posy ) )




Adam

--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi



---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.