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

Vector conversion functions #824

Merged
merged 3 commits into from
Jul 29, 2024
Merged

Vector conversion functions #824

merged 3 commits into from
Jul 29, 2024

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Jul 28, 2024

Additions

  • Different representations
    • from_tuple() + to_tuple()
    • from_array() + to_array()
  • Dimension
    • to_2d()
    • to_3d(z)
  • Component type (also for Rect2/Rect2i)
    • cast_int()
    • cast_float()
    • inspiration for naming: ptr::cast_const(), ptr::cast_mut()

Deprecations

  • deprecate from_vector2i() and similar constructors

@Bromeon Bromeon added feature Adds functionality to the library c: core Core components labels Jul 28, 2024
@GodotRust
Copy link

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

@Bromeon Bromeon force-pushed the feature/vector-conversions branch from 38809f9 to ad2d5f9 Compare July 29, 2024 19:45
Deprecate from_rect2[i], from_vectorX[i] constructors.
@Bromeon Bromeon force-pushed the feature/vector-conversions branch from ad2d5f9 to 4a0a99a Compare July 29, 2024 19:57
@Bromeon Bromeon marked this pull request as ready for review July 29, 2024 19:59
@Bromeon Bromeon added this pull request to the merge queue Jul 29, 2024
Merged via the queue into master with commit 15bc053 Jul 29, 2024
14 checks passed
@Bromeon Bromeon deleted the feature/vector-conversions branch July 29, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: core Core components feature Adds functionality to the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants