expand/compress array element values?
-
soundmind
- Member
- Posts: 236
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 
