Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix in PolyVtx() #194

Merged
merged 2 commits into from
Apr 3, 2024
Merged

Bug fix in PolyVtx() #194

merged 2 commits into from
Apr 3, 2024

Conversation

mojaveazure
Copy link
Member

Allow r (radius), xc (x center), and yc (y center) to be numeric instead of integers; also simplify example for PolyVtx()

Allow `r` (radius), `xc` (x center), and `yc` (y center) to be numeric instead of integers
Comment on lines +1412 to +1413
"'t1' must be a single, finite number" = is_bare_numeric(x = t1, n = 1L) &&
is.finite(x = t1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the previous version t1 wasn't checked for finiteness - I just want to confirm that this change was intentional 👌

Copy link
Member Author

@mojaveazure mojaveazure Mar 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is intentional. It was not checked previously as rlang::is_bare_numeric() does not have a finite parameter like rlang::is_bare_integerish() (and I didn't really know what I was doing with the argument validation)

Also, if the angle is infinite, then the resulting coordinates are all Inf (or -Inf if the angle is infinite and negative); this, to me, doesn't make sense so I want to disallow that behavior

Bump develop version
@mojaveazure mojaveazure merged commit 7bb1759 into develop Apr 3, 2024
@mojaveazure mojaveazure deleted the fix/PolyVtx branch April 3, 2024 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants