public NetIndex16(int index = 1, bool zeroSpecial = true) { this._index = index; this._zeroSpecial = zeroSpecial; this.max = NetIndex16.MaxForBits(16); if (this._zeroSpecial) { return; } ++this.max; }
public static int Difference(NetIndex16 c1, NetIndex16 c2) { int num1 = ((int)c1 - c1.max / 2) % c1.max; if (num1 < 0) { num1 = c1.max + num1; } int num2 = c1.max - num1; return((c1._index + num2) % c1.max - (int)(c2 + num2) % c1.max); }