29 lines
388 B
C#
29 lines
388 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace BitStrap
|
|
{
|
|
[Serializable]
|
|
public class FloatBounds : NumberBounds<float>
|
|
{
|
|
public FloatBounds()
|
|
{
|
|
}
|
|
|
|
public FloatBounds(float min, float max)
|
|
: base(min, max)
|
|
{
|
|
}
|
|
|
|
public float RandomInside()
|
|
{
|
|
return UnityEngine.Random.Range(min, max);
|
|
}
|
|
|
|
public float Lerp(float t)
|
|
{
|
|
return Mathf.Lerp(min, max, t);
|
|
}
|
|
}
|
|
}
|