MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/FleX / Sample

Function Sample

core/sdf.cpp:41–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39 inline int Clamp(int x, int lower, int upper) { return min(max(lower, x), upper); }
40
41 uint32_t Sample(const uint32_t* image, uint32_t w, uint32_t h, int x, int y)
42 {
43 return image[Clamp(y, 0, h-1)*w + Clamp(x, 0, w-1)];
44 }
45
46 uint32_t Sample(const uint32_t* image, uint32_t w, uint32_t h, uint32_t d, int x, int y, int z)
47 {

Callers 1

EdgeDetectFunction · 0.85

Calls 1

ClampFunction · 0.70

Tested by

no test coverage detected