Skip to content

Commit

Permalink
set limits between 0 and 2 pi
Browse files Browse the repository at this point in the history
  • Loading branch information
robitalec committed Oct 7, 2024
1 parent 12a7b5b commit 2c3dd37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/direction_to_centroid.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ direction_to_centroid <- function(
'rad'
)
)]
DT[direction_centroid < units::as_units(0, 'rad'),
direction_centroid := direction_centroid + units::as_units(2 * pi, 'rad')]

return(DT[])
}

0 comments on commit 2c3dd37

Please sign in to comment.