Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn clamp [value minimum maximum]
- (let [clamp-top (if maximum
- (min value maximum)
- value)]
- (if minimum
- (max minimum clamp-top)
- clamp-top)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement