-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add rotate_toward method to Vector2, Vector3, Quaternion, and Basis #82699
Conversation
Vector functions with separate magnitude move taken out.
|
5a5826c
to
d90f714
Compare
@fire you mentioned on the chat (before I left the reviews yesterday) that you are abandoning this PR and were hoping the original author (I assume referring to me) would be able to take it on. I am supposed to make my own PR on this right? |
@@ -189,6 +189,10 @@ struct _NO_DISCARD_ Basis { | |||
rows[2].zero(); | |||
} | |||
|
|||
_FORCE_INLINE_ Basis rotate_toward(Basis p_to_basis, real_t p_delta) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_FORCE_INLINE_ Basis rotate_toward(Basis p_to_basis, real_t p_delta) const { | |
_FORCE_INLINE_ Basis rotate_toward(const Basis &p_to_basis, real_t p_delta) const { |
<param index="0" name="to" type="Vector2" /> | ||
<param index="1" name="delta" type="float" /> | ||
<description> | ||
Returns the result of rotating this vector towards [param to], by increment [param delta] (in radians). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns the result of rotating this vector towards [param to], by increment [param delta] (in radians). | |
Returns the result of rotating this vector toward [param to], by increment [param delta] (in radians). |
"towards" is generally considered UK English, and "toward" is used in the line below so best to keep uniform
<param index="0" name="to" type="Vector3" /> | ||
<param index="1" name="delta" type="float" /> | ||
<description> | ||
Returns the result of rotating this vector towards [param to], by increment [param delta] (in radians). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns the result of rotating this vector towards [param to], by increment [param delta] (in radians). | |
Returns the result of rotating this vector toward [param to], by increment [param delta] (in radians). |
Superseded by: #82926 |
Trial pr to implement godotengine/godot-proposals#7965