diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index c1cea986886..7113544ec40 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -147,7 +147,7 @@ bConstraintOb *BKE_constraints_make_evalob( cob->rotOrder = ob->rotmode; } else { - /* Quats/Axis-Angle, so Eulers should just use default order */ + /* Quaternion/Axis-Angle, so Eulers should just use default order. */ cob->rotOrder = EULER_ORDER_DEFAULT; } copy_m4_m4(cob->matrix, ob->object_to_world); @@ -171,7 +171,7 @@ bConstraintOb *BKE_constraints_make_evalob( cob->rotOrder = cob->pchan->rotmode; } else { - /* Quats, so eulers should just use default order */ + /* Quaternion, so eulers should just use default order */ cob->rotOrder = EULER_ORDER_DEFAULT; } diff --git a/source/blender/blenkernel/intern/curve.cc b/source/blender/blenkernel/intern/curve.cc index 3ab5dddd68d..c37ad57ae94 100644 --- a/source/blender/blenkernel/intern/curve.cc +++ b/source/blender/blenkernel/intern/curve.cc @@ -2166,7 +2166,10 @@ static void bevel_list_apply_tilt(BevList *bl) bevp2++; } } -/* smooth quats, this function should be optimized, it can get slow with many iterations. */ +/** + * Smooth quaternions, this function should be optimized, + * it can get slow with many iterations. + */ static void bevel_list_smooth(BevList *bl, int smooth_iter) { BevPoint *bevp2, *bevp1, *bevp0; @@ -2199,7 +2202,7 @@ static void bevel_list_smooth(BevList *bl, int smooth_iter) copy_qt_qt(bevp0_quat, bevp0->quat); while (nr--) { - /* interpolate quats */ + /* Interpolate quaternions. */ float zaxis[3] = {0, 0, 1}, cross[3], q2[4]; interp_qt_qtqt(q, bevp0_quat, bevp2->quat, 0.5); normalize_qt(q); @@ -2314,7 +2317,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl) bevp_last = bevp_first; bevp_last--; - /* quats and vec's are normalized, should not need to re-normalize */ + /* Quaternions and vectors are normalized, should not need to re-normalize. */ mul_qt_v3(bevp_first->quat, vec_1); mul_qt_v3(bevp_last->quat, vec_2); normalize_v3(vec_1); diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index 3528e81c26f..e01d52f8c63 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -2998,7 +2998,7 @@ void BKE_object_rot_to_mat3(const Object *ob, float mat[3][3], bool use_drot) * with the rotation matrix to yield the appropriate rotation */ - /* rotations may either be quats, eulers (with various rotation orders), or axis-angle */ + /* Rotations may either be quaternions, eulers (with various rotation orders), or axis-angle. */ if (ob->rotmode > 0) { /* Euler rotations * (will cause gimbal lock, but this can be alleviated a bit with rotation orders). */ diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index 495d0ddbefa..ff2cb1b2603 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -1372,9 +1372,7 @@ bool paint_calculate_rake_rotation(UnifiedPaintSettings *ups, float r = paint_rake_rotation_spacing(ups, brush); float rotation; - /* Use a smaller limit if the stroke hasn't started - * to prevent excessive preroll. - */ + /* Use a smaller limit if the stroke hasn't started to prevent excessive pre-roll. */ if (!stroke_has_started) { r = min_ff(r, 4.0f); } diff --git a/source/blender/blenlib/tests/BLI_math_rotation_test.cc b/source/blender/blenlib/tests/BLI_math_rotation_test.cc index 2aa9d137b09..045e82c028b 100644 --- a/source/blender/blenlib/tests/BLI_math_rotation_test.cc +++ b/source/blender/blenlib/tests/BLI_math_rotation_test.cc @@ -25,7 +25,7 @@ static void test_quat_to_mat_to_quat(float w, float x, float y, float z) quat_to_mat3(matrix, norm_quat); mat3_normalized_to_quat(out_quat, matrix); - /* The expected result is flipped (each orientation corresponds to 2 quats) */ + /* The expected result is flipped (each orientation corresponds to 2 quaternions). */ if (w < 0) { mul_qt_fl(norm_quat, -1); } diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 1a1cbc880e1..bd2a02286ce 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -1614,7 +1614,7 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob) col = uiLayoutColumn(layout, false); - /* XXX: RNA buts show data in native types (i.e. quats, 4-component axis/angle, etc.) + /* XXX: RNA buts show data in native types (i.e. quaternion, 4-component axis/angle, etc.) * but old-school UI shows in eulers always. Do we want to be able to still display in Eulers? * Maybe needs RNA/UI options to display rotations as different types. */ v3d_transform_butsR(col, &pchanptr); diff --git a/source/blender/editors/space_view3d/view3d_navigate_smoothview.cc b/source/blender/editors/space_view3d/view3d_navigate_smoothview.cc index db89a381a3c..2c680036561 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_smoothview.cc +++ b/source/blender/editors/space_view3d/view3d_navigate_smoothview.cc @@ -300,8 +300,8 @@ void ED_view3d_smooth_view_ex( sms.time_allowed = double(smooth_viewtx / 1000.0); - /* If this is view rotation only we can decrease the time allowed by the angle between quats - * this means small rotations won't lag. */ + /* If this is view rotation only we can decrease the time allowed by the angle between + * quaternions this means small rotations won't lag. */ if (sview->quat && !sview->ofs && !sview->dist) { /* scale the time allowed by the rotation */ /* 180deg == 1.0 */ diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.cc b/source/blender/editors/space_view3d/view3d_navigate_walk.cc index e83ff51d200..740268417e1 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_walk.cc +++ b/source/blender/editors/space_view3d/view3d_navigate_walk.cc @@ -475,7 +475,7 @@ enum { WALK_CONFIRM = 2, }; -/* keep the previous speed until user changes userpreferences */ +/* Keep the previous speed until user changes preferences. */ static float base_speed = -1.0f; static float userdef_speed = -1.0f; diff --git a/source/blender/geometry/intern/mesh_merge_by_distance.cc b/source/blender/geometry/intern/mesh_merge_by_distance.cc index 9eae464f111..573d659b770 100644 --- a/source/blender/geometry/intern/mesh_merge_by_distance.cc +++ b/source/blender/geometry/intern/mesh_merge_by_distance.cc @@ -389,8 +389,8 @@ static Vector weld_edge_ctx_alloc_and_find_collapsed(Span edges, * \param weld_edges: Candidate edges for merging (edges that don't collapse and that have at least * one weld vertex). * - * \return r_edge_dest_map: Map of indices pointing the source edges to eacth targed. - * \return r_edge_double_kill_len: Number of duplicate edges to be destroyed. + * \param r_edge_dest_map: Resulting map of indices pointing the source edges to each target. + * \param r_edge_double_kill_len: Resulting number of duplicate edges to be destroyed. */ static void weld_edge_find_doubles(Span weld_edges, int mvert_num, diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index c7c4d76f29a..e8cca95e0d3 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -863,7 +863,7 @@ static bool joint_callback(const iTaSC::Timestamp ×tamp, axis_angle_to_mat3(rmat, &chan->quat[1], chan->quat[0]); } else { - /* quats are normalized before use to eliminate scaling issues */ + /* Quaternions are normalized before use to eliminate scaling issues. */ normalize_qt(chan->quat); quat_to_mat3(rmat, chan->quat); } diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c index 413a3f77128..2fa370d8ba0 100644 --- a/source/blender/windowmanager/intern/wm_files_link.c +++ b/source/blender/windowmanager/intern/wm_files_link.c @@ -224,7 +224,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op) filepath, libname, &group, &name); /* NOTE: Need to also check filepath, as typically libname is an empty string here (when trying - * to append from current file from the filebrowser e.g.). */ + * to append from current file from the file-browser e.g.). */ if (BLI_path_cmp(BKE_main_blendfile_path(bmain), filepath) == 0 || BLI_path_cmp(BKE_main_blendfile_path(bmain), libname) == 0) {