[][src]Function simple_libc::constrain

pub fn constrain<T: Ord + Eq>(val: T, min: T, max: T) -> T

Constrain a value to a particular range.

This is included because sometimes when using sysconf() it's helpful to constrain a value to a sane range before using it as a buffer size or similar.