fromAngle returns a 2D Vector #8142
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #8118 - this thread has much more detail, but the short version is as follows.
In 2.x, there are n-dimensional vectors, rather than 3D vectors, or 2D vectors that are underneath actually 3D with a 0 z-value. While this change is stabilizing, there are a couple of consequences.
First, the bug linked above: the
random2D()
function which usesfromAngle()
should both be using 2D vectors, as they both are defined in 2D space. See the above thread for the whole discussion, but rather than a breaking change, this has been recognized as an unintentional bug.Second, operations on vectors of non-matching sizes have to be handled. To make the whole topic more actionable, this is considered to be the scope of this issue: #8117