docs: 补充核心分层中文注释
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user