Beispiel #1
0
 static public IntVariance GetExpanded(this IntVariance item, int value)
 {
     return(new IntVariance(
                item.value,
                item.radius.Max((int)((item.value - value).GetAbs()))
                ));
 }
Beispiel #2
0
 static public bool IsBoundAround(this int item, IntVariance variance)
 {
     return(item.IsBoundAround(variance.value, variance.radius));
 }
Beispiel #3
0
 static public int GetVariance(IntVariance variance)
 {
     return(SOURCE.GetVariance(variance));
 }
Beispiel #4
0
 static public IntRange GetRange(this IntVariance item)
 {
     return(new IntRange(item.GetBoundA(), item.GetBoundB()));
 }
Beispiel #5
0
 static public int GetWidth(this IntVariance item)
 {
     return((int)(item.radius * 2));
 }
Beispiel #6
0
 static public int GetBoundB(this IntVariance item)
 {
     return((int)(item.value + item.radius));
 }
Beispiel #7
0
 public int GetVariance(IntVariance variance)
 {
     return(GetVariance(variance.value, variance.radius));
 }