Multislider to Always Add to 1


    Apr 18 2008 | 5:10 pm
    I'd like to have an array[n] of flonums/sliders that will always add up to a given number. For instance, I could have 4 flonums and when one value is modified, the other 3 values would adjust to keep the total equal to 1. Ultimately I'd like a multi-slider whose outputs always add up to 1 (so that each slider is a percentage).
    -- Morgan Sutherland

    • Apr 18 2008 | 6:23 pm
      On 18 Apr 2008, at 19:10, Morgan Sutherland wrote: > I'd like to have an array[n] of flonums/sliders that will always add > up to a given number. > For instance, I could have 4 flonums and when one value is modified, > the other 3 values would adjust to keep the total equal to 1. > Ultimately I'd like a multi-slider whose outputs always add up to 1 > (so that each slider is a percentage).
      divide each element by the sum.
    • Apr 18 2008 | 7:06 pm
    • Jan 18 2017 | 10:15 am
      Hi
      sorry to dig up a 9 year old (:O )thread
      this works well but is there also a way of doing this so that you can actually have 1 as a multislider value?
      this appears to always approach 1 but never quite get there (due to i guess it always updating itself)
      thank