mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 03:46:50 +01:00
Mark the parameters of Basis::rotate_to_align as const ref.
This commit is contained in:
parent
9e326c3000
commit
47e637b2b8
@ -404,7 +404,7 @@ Quaternion Basis::get_rotation_quaternion() const {
|
||||
return m.get_quaternion();
|
||||
}
|
||||
|
||||
void Basis::rotate_to_align(Vector3 p_start_direction, Vector3 p_end_direction) {
|
||||
void Basis::rotate_to_align(const Vector3 &p_start_direction, const Vector3 &p_end_direction) {
|
||||
// Takes two vectors and rotates the basis from the first vector to the second vector.
|
||||
// Adopted from: https://gist.github.com/kevinmoran/b45980723e53edeb8a5a43c49f134724
|
||||
const Vector3 axis = p_start_direction.cross(p_end_direction).normalized();
|
||||
|
@ -81,7 +81,7 @@ struct _NO_DISCARD_CLASS_ Basis {
|
||||
Quaternion get_rotation_quaternion() const;
|
||||
Vector3 get_rotation() const { return get_rotation_euler(); };
|
||||
|
||||
void rotate_to_align(Vector3 p_start_direction, Vector3 p_end_direction);
|
||||
void rotate_to_align(const Vector3 &p_start_direction, const Vector3 &p_end_direction);
|
||||
|
||||
Vector3 rotref_posscale_decomposition(Basis &rotref) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user