public float Get(System.Random random) { if (Math.Abs(Max) < 0.00001f && Math.Abs(Min) < 0.00001f) { return(0); } if (Max < Min) { return(random.NextFloat(Max, Min)); } return(random.NextFloat(Min, Max)); }
public Vector3 Get(System.Random random) { if (Math.Abs(Max) < 0.001f && Math.Abs(Min) < 0.001f) { return(Vector3.zero); } var value = random.NextFloat(Min, Max); if (!AllowZero) { while (Math.Abs(value) < 0.1f) { value = random.NextFloat(Min, Max); } } return(new Vector3(value, value, value)); }
protected float GetRandomHeight(System.Random random) { return(random.NextFloat(HeightScale.x, HeightScale.y)); }
protected float GetRandomWidthScale(System.Random random) { return(random.NextFloat(WidthScale.x, WidthScale.y)); }