multipass-0.1: Data/Pass/Util.hs
module Data.Pass.Util
( clamp
) where
clamp :: Int -> Int -> Int
clamp n k
| k <= 0 = 0
| k >= n = n - 1
| otherwise = k
{-# INLINE clamp #-}
module Data.Pass.Util
( clamp
) where
clamp :: Int -> Int -> Int
clamp n k
| k <= 0 = 0
| k >= n = n - 1
| otherwise = k
{-# INLINE clamp #-}