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

Remove to_2d() + to_3d(); clean up ApiParam #943

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Nov 5, 2024

Remove vector to_2d() + to_3d() methods

Semantics aren't obvious -- while Z component is the mathematically natural extension, in Godot Y would be more typical (being the up/down axis in 3D). There's also the topic of +/- signs... Maybe it can be re-added once there are clearer use cases.

Alternatively, a more flexible swizzle! macro supporting 0 when extending is possible.

ApiParam cleanups

  • Rename ApiParam::value_to_arg() -> owned_to_arg()
  • Hide associated Arg type (not intended to be used directly)
  • Minor docs

@Bromeon Bromeon added quality-of-life No new functionality, but improves ergonomics/internals c: core Core components labels Nov 5, 2024
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-943

@Bromeon
Copy link
Member Author

Bromeon commented Nov 5, 2024

Not marked breaking-change because both APIs haven't been part of v0.1.

Semantics aren't obvious -- while Z component is the mathematically natural extension,
in Godot Y would be more typical (being the up/down axis in 3D). There's also the topic
of +/- signs... Maybe it can be re-added once there are clearer use cases.

Alternatively, a more flexible swizzle! macro supporting 0 when extending is possible.
@Bromeon Bromeon force-pushed the qol/arg-and-3d branch 2 times, most recently from 1c905e6 to 3aefb03 Compare November 5, 2024 20:51
@Bromeon Bromeon enabled auto-merge November 5, 2024 20:55
@Bromeon Bromeon added this pull request to the merge queue Nov 5, 2024
Merged via the queue into master with commit 9e4f380 Nov 5, 2024
15 checks passed
@Bromeon Bromeon deleted the qol/arg-and-3d branch November 5, 2024 21:04
@Bromeon Bromeon added this to the 0.2 milestone Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: core Core components quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants