☰
Debian Codegraph
@
1.1.0-1
/
/
src
/
math.rs
☽
☼
src/math.rs
code
plain
raw
symbols
SCIP
MIT
2014-2018 nwin <
[email protected]
>; 2014-2018 PistonDevelopers; 1994 Anthony Dekker
debian/copyright
1
#[inline]
2
pub(
crate
) fn
clamp
(
a
: i32) -> i32 {
3
if
a
<
0 {
4
0
5
} else if
a
>
255 {
6
255
7
} else {
8
a
9
}
10
}