リポジトリ
使用例
using UniRandomUtils;
using UnityEngine;
public sealed class Example : MonoBehaviour
{
private void Start()
{
Debug.Log( RandomUtils.InsideUnitCircle );
Debug.Log( RandomUtils.InsideUnitSphere );
Debug.Log( RandomUtils.OnUnitSphere );
Debug.Log( RandomUtils.Rotation );
Debug.Log( RandomUtils.RotationUniform );
Debug.Log( RandomUtils.Between0And1 );
Debug.Log( RandomUtils.FalseOrTrue );
Debug.Log( RandomUtils.Value0Or1 );
var list = new[] { 1, 2, 3 };
Debug.Log( RandomUtils.RandomAt( list ) );
Debug.Log( RandomUtils.Range( 100 ) );
}
}