Code: Select all
MAX [S] in ( [S1]=5, [S2]=15, [S3]=99 ) => [S]=99
MIN [S] in ( [S1]=5, [S2]=15, [S3]=99 ) => [S]=5
Code: Select all
[S]=6; If [S] > 5 Then [S]=5 Else [S]=[S]
[S]=1; If [S] < 2 Then [S]=2 Else [S]=[S]
Moderator: ickputzdirwech
Code: Select all
MAX [S] in ( [S1]=5, [S2]=15, [S3]=99 ) => [S]=99
MIN [S] in ( [S1]=5, [S2]=15, [S3]=99 ) => [S]=5
Code: Select all
[S]=6; If [S] > 5 Then [S]=5 Else [S]=[S]
[S]=1; If [S] < 2 Then [S]=2 Else [S]=[S]
You can cap values on one side with one deciders, one arithmetic and two ticks; two deciders, two arithmetic and two ticks for both sides. If keeping signals in sync is important add two extra arithmetic combinators for adjusting delays.nets wrote: ↑Fri Nov 10, 2023 6:41 pm The same I've run across a need to find easily (read: not turn into a cluster of combinators) to cap values at the bottom and top.
Code: Select all
[S]=6; If [S] > 5 Then [S]=5 Else [S]=[S] [S]=1; If [S] < 2 Then [S]=2 Else [S]=[S]
As per today's FFF, 2.0's selector combinator will have those functions.Roflhouse42 wrote: ↑Fri Nov 10, 2023 7:30 pm I would love for min/max to be added to the Arithmetic Combinator or the Decider Combinator.