Skip to content

Commit

Permalink
fix bug in arrow_cup()
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Nov 5, 2023
1 parent 600bfa4 commit 69148ed
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/arrow_shapes.R
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ arrow_cup <- function(lineend = "round", angle = NULL) {
if (lineend == "round") {
cx <- (x[1, 1] + x[1, 2]) / 2
cy <- (y[1, 1] + y[1, 2]) / 2
norm <- -0.5 * angle - .halfpi
norm <- seq(norm + pi, norm, length.out = 20)[-c(1, 20)]

norm <- seq(.twopi, pi, length.out = 20)[-c(1, 20)] + 0.5 * angle
cx <- cx + cos(norm) * width * 0.5
cy <- cy + sin(norm) * width * 0.5
} else {
Expand Down

0 comments on commit 69148ed

Please sign in to comment.