Given the bearing angle of an object to another, this function calculates the frontness, a value that ranges from 0 to 1 and represents how in front the focal object is from its neighbor.
Value
A vector of the same length as bs representing the frontness of a focal object to its neighbor.
Author
Marina Papadopoulou, m.papadopoulou.rug@gmail.com
Examples
bs <- runif(25, max = pi)
frontness(bs)
#> [1] 0.78329569 0.62185330 0.86605874 0.91985234 0.32539892 0.91576207
#> [7] 0.08054491 0.85551768 0.30502898 0.73636304 0.94096257 0.86102324
#> [13] 0.36417012 0.91252348 0.75292220 0.64148241 0.79545033 0.98497173
#> [19] 0.62236924 0.55532649 0.96106650 0.91563972 0.60327560 0.31155411
#> [25] 0.55515212