static public ShortRange GetExpanded(this ShortRange item, short value) { return(new ShortRange( item.x1.Min(value), item.x2.Max(value) )); }
static public bool IsBoundBetween(this short item, ShortRange range) { return(item.IsBoundBetween(range.x1, range.x2)); }
static public short BindBetween(this short item, ShortRange range) { return(item.BindBetween(range.x1, range.x2)); }
static public ShortRange GetFlipped(this ShortRange item) { return(new ShortRange(item.x2, item.x1)); }
static public ShortVariance GetVariance(this ShortRange item) { return(new ShortVariance(item.GetCenter(), item.GetRadius())); }
static public short GetWidth(this ShortRange item) { return((short)(item.x2 - item.x1)); }
static public short GetRadius(this ShortRange item) { return((short)(item.GetWidth() / 2)); }
static public short GetCenter(this ShortRange item) { return((short)((item.x1 + item.x2) / 2)); }