示例#1
0
 static public DecimalVariance GetExpanded(this DecimalVariance item, decimal value)
 {
     return(new DecimalVariance(
                item.value,
                item.radius.Max((decimal)((item.value - value).GetAbs()))
                ));
 }
示例#2
0
 static public bool IsBoundAround(this decimal item, DecimalVariance variance)
 {
     return(item.IsBoundAround(variance.value, variance.radius));
 }
示例#3
0
 static public decimal GetWidth(this DecimalVariance item)
 {
     return((decimal)(item.radius * 2));
 }
示例#4
0
 static public DecimalRange GetRange(this DecimalVariance item)
 {
     return(new DecimalRange(item.GetBoundA(), item.GetBoundB()));
 }
示例#5
0
 static public decimal GetBoundB(this DecimalVariance item)
 {
     return((decimal)(item.value + item.radius));
 }