(value: number, step: number)
| 75 | const DEFAULT_COLOR = parseColor('hsl(0, 100%, 50%)'); |
| 76 | |
| 77 | function roundToStep(value: number, step: number): number { |
| 78 | return Math.round(value / step) * step; |
| 79 | } |
| 80 | |
| 81 | function mod(n: number, m: number) { |
| 82 | return ((n % m) + m) % m; |