Lines Matching refs:coord
299 static uint32_t wrapI(rs_sampler_value wrap, int32_t coord, int32_t size) {
301 coord = coord % size;
302 if (coord < 0) {
303 coord += size;
307 coord = coord % (size * 2);
308 if (coord < 0) {
309 coord = (size * 2) + coord;
311 if (coord >= size) {
312 coord = (size * 2) - coord;
315 return (uint32_t)max(0, min(coord, size - 1));