示例#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));
 }