Clamp value with single combinator

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Tertius
Smart Inserter
Smart Inserter
Posts: 1643
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Clamp value with single combinator

Post by Tertius »

Didn't see it before elsewhere: clamping some value to an upper limit with a single combinator.

[L]=value to clamp
[M]=upper limit




out.mp4
(336.42 KiB) Downloaded 79 times
mechatimer
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Nov 10, 2024 12:53 am
Contact:

Re: Clamp value with single combinator

Post by mechatimer »

Very useful for setting train limits!

For other possible applications, you can even go further and clamp the value between a lower and upper bound:
ClampNumber.png
ClampNumber.png (135.39 KiB) Viewed 103 times
Here, I added [N] as the lower limit. Note that N and M have to have different values, otherwise the 'each' signal will output the sum of both of them.
Post Reply

Return to “Combinator Creations”