Clip/Coerce values of a Vector #837
Replies: 4 comments
-
Hi Currently we only have two variants of But if I understand you correctly, you don't want to coerce to zero but to an interval. With the proposed min-max coerce function, values smaller than min would be replaced with min and values greater than max should be replaced with max? I wonder how we could extend this to complex vectors. |
Beta Was this translation helpful? Give feedback.
-
You can currently do something like this with the |
Beta Was this translation helpful? Give feedback.
-
Ah, I forgot, we also have the |
Beta Was this translation helpful? Give feedback.
-
I wasn't thinking about passing the function, rather passing the min and max values.
More than happy to provide a PR if we agree on the design and you think that could be valuable for others. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I can't seem to find any method to coerce values of a vector between 2 threshold (min and max) I would give. I am not sure if I am not looking from the right word or if no-one ever felt the need for such method.
In case the method doesn't exist but you see value to it, I'd be happy to try and provide a PR for it.
Beta Was this translation helpful? Give feedback.
All reactions