MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / clamp

Function clamp

examples/image_processing/image_editing.cpp:34–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34array clamp(const array &in, float min = 0.0f, float max = 255.0f) {
35 return ((in < min) * 0.0f + (in > max) * 255.0f +
36 (in >= min && in <= max) * in);
37}
38
39/**
40 * radius effects the level of details that will effected during sharpening

Callers 4

mainFunction · 0.70
getRandomNeighborFunction · 0.70
rearrange_imageFunction · 0.50
generate_imageFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected