expand/compress array element values?
I know that there is an array expand/compress module but it is only for array length. is there a way to do the same with the values of the elements within the array? i am trying to use one array to edit the values in multiple arrays all with different min/max values but i want the resulting arrays to maintain the shape of the first one.. thanks.
-
martignasse
- Site Admin
- Posts: 611
- Location: Lyon, FRANCE
- Contact:
you have at least two way to achieve this :
with a mapper curve :
-You set min in, max in, min ou and max out, with a linear mapping.
with a A*in+B module (affine transformation) :
-Set A to (max out - min out)
-Set in with the array data
-Set B to min out
hope it help
with a mapper curve :
-You set min in, max in, min ou and max out, with a linear mapping.
with a A*in+B module (affine transformation) :
-Set A to (max out - min out)
-Set in with the array data
-Set B to min out
hope it help
Martin FLEURENT - Usine Developer - SDK maintainer
-
Clearscreen
- Member
- Posts: 482
- Location: Australia
- Contact:
it's worth remembering all the math modules work on arrays... comes in very very handy at times 
Thanks for the info martin. i did not know it was that easy.
thanks for all the help.
definitely good to know this.Clearscreen wrote:it's worth remembering all the math modules work on arrays... comes in very very handy at times
thanks for all the help.
Who is online
Users browsing this forum: No registered users and 29 guests
