Skip to content

Instantly share code, notes, and snippets.

@unity3dcollege
Created September 30, 2017 20:37
Show Gist options
  • Save unity3dcollege/e76f0c0ed9fda9b15046eec246f34d2e to your computer and use it in GitHub Desktop.
Save unity3dcollege/e76f0c0ed9fda9b15046eec246f34d2e to your computer and use it in GitHub Desktop.
[System.Serializable]
public struct RangedFloat
{
public float minValue;
public float maxValue;
public RangedFloat(float minValue, float maxValue)
{
this.minValue = minValue;
this.maxValue = maxValue;
}
public float RandomInRange()
{
return UnityEngine.Random.Range(minValue, maxValue);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment