using UnityEngine;
using System.Collections;

public static class RandomExtensions
{
    public static Vector3 GetPositionInBox(Vector3 position, Vector3 center, Vector3 size)
    {
        var halfSize = size * 0.5f;
        return new Vector3(Random.Range(-halfSize.x, halfSize.x), Random.Range(-halfSize.y, halfSize.y), Random.Range(-halfSize.z, halfSize.z)) + position + center;
    }

}
