예제 #1
0
 static public FloatVariance GetExpanded(this FloatVariance item, float value)
 {
     return(new FloatVariance(
                item.value,
                item.radius.Max((float)((item.value - value).GetAbs()))
                ));
 }
예제 #2
0
 static public bool IsBoundAround(this float item, FloatVariance variance)
 {
     return(item.IsBoundAround(variance.value, variance.radius));
 }
예제 #3
0
 static public float ConvertFromPercentToVariance(this float item, FloatVariance variance)
 {
     return(item.ConvertFromPercentToVariance(variance.value, variance.radius));
 }
예제 #4
0
 static public float ConvertFromVarianceToVariance(this float item, FloatVariance src, FloatVariance dst)
 {
     return(item.ConvertFromVarianceToVariance(src.value, src.radius, dst.value, dst.radius));
 }
예제 #5
0
 static public float ConvertFromVarianceToOffset(this float item, FloatVariance variance)
 {
     return(item.ConvertFromVarianceToOffset(variance.value, variance.radius));
 }
예제 #6
0
 static public FloatRange GetRange(this FloatVariance item)
 {
     return(new FloatRange(item.GetBoundA(), item.GetBoundB()));
 }
예제 #7
0
 static public float GetWidth(this FloatVariance item)
 {
     return((float)(item.radius * 2));
 }
예제 #8
0
 static public float GetBoundB(this FloatVariance item)
 {
     return((float)(item.value + item.radius));
 }
예제 #9
0
 public float GetVariance(FloatVariance variance)
 {
     return(GetVariance(variance.value, variance.radius));
 }