int OppositeOf(int a, int b) { ArraySlice <int> points = m_Stars[b].points; for (int k = 1, n = m_Stars[b].pointCount; k < n; k += 2) { if (points[k] == a) { return(points[k - 1]); } } return(-1); }
void RemovePair(int r, int j, int k) { UStar s = m_Stars[r]; ArraySlice <int> points = s.points; for (int i = 1, n = s.pointCount; i < n; i += 2) { if (points[i - 1] == j && points[i] == k) { points[i - 1] = points[n - 2]; points[i] = points[n - 1]; s.points = points; s.pointCount = s.pointCount - 2; m_Stars[r] = s; return; } } }
public bool Equals(ArraySlice <T> other) { return(m_Buffer == other.m_Buffer && m_Stride == other.m_Stride && m_Length == other.m_Length); }
public ArraySliceDebugView(ArraySlice <T> slice) { m_Slice = slice; }