Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions reference/sketch_constrain.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# constrain()

Constrains a value to not exceed a maximum and minimum value.
Constrains a value between a minimum and maximum value.

## Examples

Expand All @@ -23,15 +23,15 @@ def draw():

## Description

Constrains a value to not exceed a maximum and minimum value.
Restrict the input value to a specified range defined by a minimum and a maximum limit.

## Signatures

```python
constrain(
amt: Union[float, npt.NDArray], # the value to constrain
low: Union[float, npt.NDArray], # maximum limit
high: Union[float, npt.NDArray], # minimum limit
low: Union[float, npt.NDArray], # minimum limit
high: Union[float, npt.NDArray], # maximum limit
) -> Union[float, npt.NDArray]
```

Expand Down