Add explanations for errors related to Vector/Quat normalization
This commit is contained in:
parent
97cc2e53f6
commit
a002b93d86
8 changed files with 28 additions and 28 deletions
|
|
@ -800,7 +800,7 @@ void Basis::set_quat(const Quat &p_quat) {
|
|||
void Basis::set_axis_angle(const Vector3 &p_axis, real_t p_phi) {
|
||||
// Rotation matrix from axis and angle, see https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_angle
|
||||
#ifdef MATH_CHECKS
|
||||
ERR_FAIL_COND_MSG(!p_axis.is_normalized(), "Axis must be normalized.");
|
||||
ERR_FAIL_COND_MSG(!p_axis.is_normalized(), "The axis Vector3 must be normalized.");
|
||||
#endif
|
||||
Vector3 axis_sq(p_axis.x * p_axis.x, p_axis.y * p_axis.y, p_axis.z * p_axis.z);
|
||||
real_t cosine = Math::cos(p_phi);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue