Skip to content

Commit

Permalink
linear logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jan 9, 2025
1 parent b68bb95 commit 5682950
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions R/layout-circle-switch.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@
circle_switch <- function(radial = waiver(), direction = NULL,
what = waiver(), ...) {
rlang::check_dots_empty()
if (!is.waive(radial)) {
assert_s3_class(radial, "CoordRadial", allow_null = TRUE)
}
if (!is.waive(radial) &&
!is.null(radial) &&
abs(diff(radial$arc)) < pi / 2L) {
cli_abort("Cannot use circle of acute angle < 90 in {.arg radial}")
if (!is.waive(radial) && !is.null(radial)) {
assert_s3_class(radial, "CoordRadial")
if (abs(diff(radial$arc)) < pi / 2L) {
cli_abort("Cannot use circle of acute angle < 90 in {.arg radial}")
}
}
if (!is.null(direction)) {
direction <- arg_match0(direction, c("inward", "outward"))
Expand Down

0 comments on commit 5682950

Please sign in to comment.