Skip to content

Sync math structs by adding constexpr constructors/operators - #2047

Merged
dsnopek merged 1 commit into
godotengine:masterfrom
marcozee03:sync-godot-math-structs
Aug 26, 2026
Merged

Sync math structs by adding constexpr constructors/operators#2047
dsnopek merged 1 commit into
godotengine:masterfrom
marcozee03:sync-godot-math-structs

Conversation

@marcozee03

@marcozee03 marcozee03 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

closes #2046
Synced the math types like Vector* and Transform* with upstream

@marcozee03
marcozee03 requested a review from a team as a code owner August 20, 2026 05:35
@marcozee03

Copy link
Copy Markdown
Contributor Author

While syncing the files I removed the hash() function from classes implementing them. As including hashfuncs.h then caused errors. (from cyclic inclusion). Was/Is there a better way to go about it?

@Ivorforce Ivorforce left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! I didn't see any problems.

Regarding the hash() drop: That's fine for now. hashfuncs.h should be synced too, but that can be done as a separate pr.

This pr has some compat breaks so it would be good to have before v10.

@Ivorforce Ivorforce added bug This has been identified as a bug enhancement This is an enhancement on the current functionality labels Aug 25, 2026
@Ivorforce Ivorforce added this to the 10.x milestone Aug 25, 2026

@dsnopek dsnopek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks! Only a couple small notes below

Also, please squash your changes down to a single commit:

https://contributing.godotengine.org/en/latest/pull_requests/creating_pull_requests.html#the-interactive-rebase

Comment thread include/godot_cpp/variant/transform2d.hpp
Comment thread include/godot_cpp/variant/transform3d.hpp Outdated
Comment thread include/godot_cpp/variant/transform3d.hpp Outdated
Comment thread src/variant/basis.cpp Outdated
@marcozee03
marcozee03 force-pushed the sync-godot-math-structs branch from 69926f2 to f8f7d70 Compare August 25, 2026 22:48
@marcozee03
marcozee03 force-pushed the sync-godot-math-structs branch from f8f7d70 to 93bcf21 Compare August 25, 2026 22:58
@marcozee03

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback. I have implemented it and squashed the commit as you've suggested.

@dsnopek dsnopek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@dsnopek
dsnopek merged commit 101ae38 into godotengine:master Aug 26, 2026
20 checks passed
@marcozee03
marcozee03 deleted the sync-godot-math-structs branch August 27, 2026 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This has been identified as a bug enhancement This is an enhancement on the current functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vector2/3 and other types not usable in constexpr functions

3 participants