Megadocs 0.0.1
All of megapop's internal libraries
Megapop.MegaCore.IntRange Struct Reference

Public Member Functions

 IntRange (int value)
 
 IntRange (int minInclusive, int maxInclusive)
 
int GetRandomValue ()
 
bool IsValid ()
 
bool Contains (int value)
 
bool Contains (IntRange range)
 
float Clamp (int value)
 
override string ToString ()
 
bool Overlaps (IntRange a, IntRange b)
 

Static Public Member Functions

static IntRange Union (IntRange a, IntRange b)
 
static IntRange Intersection (IntRange a, IntRange b)
 

Public Attributes

int Min
 Inclusive minimum value More...
 
int Max
 Exclusive maximum value More...
 

Constructor & Destructor Documentation

◆ IntRange() [1/2]

Megapop.MegaCore.IntRange.IntRange ( int  value)
inline

◆ IntRange() [2/2]

Megapop.MegaCore.IntRange.IntRange ( int  minInclusive,
int  maxInclusive 
)
inline

Member Function Documentation

◆ Clamp()

float Megapop.MegaCore.IntRange.Clamp ( int  value)
inline

◆ Contains() [1/2]

bool Megapop.MegaCore.IntRange.Contains ( int  value)
inline

◆ Contains() [2/2]

bool Megapop.MegaCore.IntRange.Contains ( IntRange  range)
inline

◆ GetRandomValue()

int Megapop.MegaCore.IntRange.GetRandomValue ( )
inline

◆ Intersection()

static IntRange Megapop.MegaCore.IntRange.Intersection ( IntRange  a,
IntRange  b 
)
inlinestatic

◆ IsValid()

bool Megapop.MegaCore.IntRange.IsValid ( )
inline

◆ Overlaps()

bool Megapop.MegaCore.IntRange.Overlaps ( IntRange  a,
IntRange  b 
)
inline

◆ ToString()

override string Megapop.MegaCore.IntRange.ToString ( )
inline

◆ Union()

static IntRange Megapop.MegaCore.IntRange.Union ( IntRange  a,
IntRange  b 
)
inlinestatic

Member Data Documentation

◆ Max

int Megapop.MegaCore.IntRange.Max

Exclusive maximum value

◆ Min

int Megapop.MegaCore.IntRange.Min

Inclusive minimum value


The documentation for this struct was generated from the following file: