ActionScript 3 Random Value Generation Random angle, in radians


Example

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

Example outputs:

  • 5.490068569213088
  • 3.1984284719180205
  • 4.581117863808207