docs: 补充核心分层中文注释

This commit is contained in:
chenjintao
2026-09-29 18:18:44 +08:00
parent a77471a7b1
commit 9fd01bb61b
81 changed files with 1189 additions and 112 deletions
@@ -6,6 +6,7 @@
#include "domain_internal.h"
/* 角度统一归一化到 (-180, 180],为目录匹配和最短旋转提供唯一表示。 */
float domain_angle_normalize(float angle)
{
while (angle > 180.0f) {
@@ -19,6 +20,7 @@ float domain_angle_normalize(float angle)
float domain_angle_shortest_rotation(float current, float target)
{
/* 结果限制到 [-180, 180],正负号决定方向,避免不必要的整圈运动。 */
float diff = target - current;
while (diff > 180.0f) {