| 279 | */ |
| 280 | template <typename T> |
| 281 | inline T wrap_around(T x, T m) |
| 282 | { |
| 283 | return x >= 0 ? x % m : (x % m + m) % m; |
| 284 | } |
| 285 | |
| 286 | /** Convert negative coordinates to positive in the range [0, num_dims_input] |
| 287 | * |
no outgoing calls
no test coverage detected