File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,15 @@ Implemented as described in the PhD thesis of Uwe Fechner.
1616
1717Calculate a saturated value, that stays within the given limits.
1818
19- Parameters:
19+ ## Parameters:
2020- value: the input value
2121- min_: the lower value to which it shall be clamped
2222- max_: the upper value to which it shall be clamped
2323
24- Returns:
24+ ## Returns:
2525- the clamped value
2626
27- Remark:
27+ ## Remark:
2828- consider using the function `clamp` or the macro [`@limit`](@ref) instead
2929"""
3030function saturate(value, min_, max_)
4242
4343Limit the value of a variable.
4444
45- Parameters:
45+ ## Parameters:
4646- name: the name of the scalar variable that shall be limited
4747- minmax: if max is provided, this is the lower value to which the variable is clamped, otherwise it is the upper value
4848- max: the upper value to which to limit the provided variable or nothing
4949
50- Usage:
50+ ## Usage:
5151- @limit x 1 4 # limits the value to the range 1 .. 4, modifies x
5252- @limit x 10 # limits the value to the range -inf .. 10, modifies x
5353
You can’t perform that action at this time.
0 commit comments