以弧度为单位的随机角度

function randomAngleRadians():Number
{
    return Math.random() * Math.PI * 2;
}

示例输出:

  • 5.490068569213088
  • 3.1984284719180205
  • 4.581117863808207