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

Rotate command: Support angle aliases "cw" and "ccw" #2640

Open
mk-pmb opened this issue Oct 8, 2024 · 2 comments
Open

Rotate command: Support angle aliases "cw" and "ccw" #2640

mk-pmb opened this issue Oct 8, 2024 · 2 comments
Labels
status:pending Pending acceptance or closure. type:feature-request Request for something new

Comments

@mk-pmb
Copy link

mk-pmb commented Oct 8, 2024

The Problem

I always get confused about the angle direction for the //rotate command.

A Solution

Make aliases "cw" for clockwise and "ccw" for counterclockwise. In my quick experiment just now, cw = 90 and ccw = 270.

Alternatives

No response

Anything Else?

No response

@mk-pmb mk-pmb added status:pending Pending acceptance or closure. type:feature-request Request for something new labels Oct 8, 2024
@wizjany
Copy link
Collaborator

wizjany commented Oct 8, 2024

While I'm not super opposed to explicitly specifying direction here, it's important to note that clockwise and counterclockwise are indeed directions, not amounts. It doesn't make sense to alias clockwise to 90 because 45 degrees is also a valid amount of rotation, as is -315 degrees. And 90 (cw) and 270 (ccw) and -90 (ccw) and -270 (cw) are all equal. Also, the directions (and units, which is also relevant. One could also argue we should allow input in radians) are the standard for headings (such as on a compass) and are explained in the //help text for rotate.

@mk-pmb
Copy link
Author

mk-pmb commented Oct 8, 2024

because 45 degrees is also a valid amount of rotation

Thanks for the reminder! I totally forgot WorldEdit can do this. Then it probably would be better to accept "cw" or "ccw" as a suffix to the angle number, e.g. //rotate 45ccw or (to same effect) //rotate -45cw. One suffix would be ignored and the other would negate the sign.

However, the 45° rotation of my jack-o-lanterns and trapdoors (unsurprisingly) falls behind a naive expectation. Rotations that are not a multiple of 90° are only partially supported due to game restrictions. Thus I think it's justified to assume "90" as the angle if "cw" or "ccw" is given without a number. (0 and 180 don't deserve cw/ccw aliases because that would be meaningless.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:pending Pending acceptance or closure. type:feature-request Request for something new
Projects
None yet
Development

No branches or pull requests

2 participants