diff options
author | Colin Okay <colin@cicadas.surf> | 2022-07-19 10:44:16 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-07-19 10:44:16 -0500 |
commit | 24b0c51a3b51c52dbba855787170107a6a7e47fb (patch) | |
tree | 6e7da9cda477b345702f0ef686d3b6fd6495852a /src/utils.lisp | |
parent | ba248e490e1ab67e124b02e765e0ee3ec7a3dd45 (diff) |
[add] canvas language and [example]
Diffstat (limited to 'src/utils.lisp')
-rw-r--r-- | src/utils.lisp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils.lisp b/src/utils.lisp index f3dba06..4ace1b8 100644 --- a/src/utils.lisp +++ b/src/utils.lisp @@ -150,3 +150,7 @@ the path." sum (* coeff y) into by finally (return (list bx by)))))) +(defun clamp (lo val hi) + "Returns VAL if (< LO VAL HI), otherwise returns LO or HI depending +on which boundary VAL is outside of." + (max lo (min val hi))) |