Jump to content
Sign in to follow this  
Valent

the maximum value of an attribute

Recommended Posts

Hi)
Can I somehow get the maximum(and the minimum) value of an attribute in VEX? I want to use them in a FIT function.

 

Share this post


Link to post
Share on other sites

You can fit-range an attribute with setdetailattrib() set to "min" and "max".

1st pointwrangle:

setdetailattrib(0, 'height_min', @height, "min");
setdetailattrib(0, 'height_max', @height, "max");

2nd pointwrangle:

float min = detail(0, "height_min", 0);
float max = detail(0, "height_max", 0);
@Cd.g = fit(@height, min, max, 0.0, 1.0);

 

fit_range_VEX.hiplc

  • Like 5

Share this post


Link to post
Share on other sites

Thanks, have tried both suggested variants, and I like Vex pipeline a bit more.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×