powered by
Calculate the Circular Difference
diffCircular(x, y, max)
A value with the circular difference. This will always be positive if defined.
Numeric or integer values
the theoretical maximum (e.g., if degrees, 360; if hours, 24; etc.).
diffCircular(330, 30, max = 360) diffCircular(22, 1, max = 24) diffCircular(c(22, 23, 21, 22), c(1, 1, 23, 14), max = 24)
Run the code above in your browser using DataLab