HKI Core
MinMaxRange.cs
Go to the documentation of this file.
1 using UnityEngine;
2 
3 namespace HKI.Core.Variables
4 {
8  [System.Serializable]
9  public struct MinMaxRange
10  {
11  // Public variables
12  public float RangeStart;
13  public float RangeEnd;
14 
15  // Constuctor
16  public MinMaxRange(float start, float end)
17  {
18  RangeStart = start;
19  RangeEnd = end;
20  }
21 
22  // Interface functions
23  public float GetRandomValue()
24  {
25  return Random.Range(RangeStart, RangeEnd);
26  }
27  }
28 }
MinMaxRange(float start, float end)
Definition: MinMaxRange.cs:16
This is a data type that combines a float start and a float end value into one value. This can be used for storing min max informations for a random generator or volume settings.
Definition: MinMaxRange.cs:9