Average of bearings
average_bearing(theta1, theta2, average_of_opposite = NULL) average_bearing_n(thetas)
theta1, theta2 | Bearings, expressed in degrees. |
---|---|
average_of_opposite | The average of opposing bearings (e.g. average of north
and south) is not well-defined. If |
thetas | A vector of bearings. |
For `average_bearing`, the bearing bisecting the two bearings.
For `average_bearing_n`, the average bearing of the bearing.
average_bearing(0, 90)#> [1] 45average_bearing(0, 270)#> [1] 315average_bearing(90, 180)#> [1] 135average_bearing(0, 180)#> [1] 0average_bearing(0, 180, average_of_opposite = 3)#> [1] 3average_bearing(0, 180, average_of_opposite = "left")#> [1] 270average_bearing_n(1:179)#> [1] 90