Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-15 15:15:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-15 15:30:31 +0300
commit4226ee0b71fec6f08897dacf3d6632526618acca (patch)
tree560c333c5a9458f3dbbb606befd52d558b35503f /source/blender/blenlib/intern/math_rotation.c
parent30c3852ffd140b003410aae25b222dea8b76412f (diff)
Cleanup: comment line length (blenlib)
Prevents clang-format wrapping text before comments.
Diffstat (limited to 'source/blender/blenlib/intern/math_rotation.c')
-rw-r--r--source/blender/blenlib/intern/math_rotation.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 8e5b3f0000e..97f456dba60 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -197,7 +197,8 @@ void sub_qt_qtqt(float q[4], const float q1[4], const float q2[4])
void pow_qt_fl_normalized(float q[4], const float fac)
{
BLI_ASSERT_UNIT_QUAT(q);
- const float angle = fac * saacos(q[0]); /* quat[0] = cos(0.5 * angle), but now the 0.5 and 2.0 rule out */
+ const float angle = fac * saacos(q[0]); /* quat[0] = cos(0.5 * angle),
+ * but now the 0.5 and 2.0 rule out */
const float co = cosf(angle);
const float si = sinf(angle);
q[0] = co;
@@ -2011,12 +2012,18 @@ void quat_apply_track(float quat[4], short axis, short upflag)
/* rotations are hard coded to match vec_to_quat */
const float sqrt_1_2 = (float)M_SQRT1_2;
const float quat_track[][4] = {
- {sqrt_1_2, 0.0, -sqrt_1_2, 0.0}, /* pos-y90 */
- {0.5, 0.5, 0.5, 0.5}, /* Quaternion((1,0,0), radians(90)) * Quaternion((0,1,0), radians(90)) */
- {sqrt_1_2, 0.0, 0.0, sqrt_1_2}, /* pos-z90 */
- {sqrt_1_2, 0.0, sqrt_1_2, 0.0}, /* neg-y90 */
- {0.5, -0.5, -0.5, 0.5}, /* Quaternion((1,0,0), radians(-90)) * Quaternion((0,1,0), radians(-90)) */
- {0.0, sqrt_1_2, sqrt_1_2, 0.0} /* no rotation */
+ /* pos-y90 */
+ {sqrt_1_2, 0.0, -sqrt_1_2, 0.0},
+ /* Quaternion((1,0,0), radians(90)) * Quaternion((0,1,0), radians(90)) */
+ {0.5, 0.5, 0.5, 0.5},
+ /* pos-z90 */
+ {sqrt_1_2, 0.0, 0.0, sqrt_1_2},
+ /* neg-y90 */
+ {sqrt_1_2, 0.0, sqrt_1_2, 0.0},
+ /* Quaternion((1,0,0), radians(-90)) * Quaternion((0,1,0), radians(-90)) */
+ {0.5, -0.5, -0.5, 0.5},
+ /* no rotation */
+ {0.0, sqrt_1_2, sqrt_1_2, 0.0}
};
assert(axis >= 0 && axis <= 5);