Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/RustCV/RustCV
/ clamp
Function
clamp
rustcv/src/videoio/mod.rs:374–382 ·
view source on GitHub ↗
(val: i32)
Source
from the content-addressed store, hash-verified
372
}
373
}
374
375
#[inline(always)]
376
fn clamp(val: i32) -> u8 {
377
if val < 0 {
378
0
379
} else if val > 255 {
380
255
381
} else {
382
val as u8
383
}
384
}
385
Callers
1
yuyv_to_bgr
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected