* Returns a quantized bucket for the given circular param shifted by offset, * notionally (param + offset) * num_buckets, but modded and casted to the * appropriate type. */
| 447 | * appropriate type. |
| 448 | */ |
| 449 | uinT8 CircBucketFor(FLOAT32 param, FLOAT32 offset, int num_buckets) { |
| 450 | int bucket = IntCastRounded(MapParam(param, offset, num_buckets)); |
| 451 | return static_cast<uinT8>(Modulo(bucket, num_buckets)); |
| 452 | } /* CircBucketFor */ |
| 453 | |
| 454 | |
| 455 | #ifndef GRAPHICS_DISABLED |
no test coverage detected