get method

double get(
  1. Body bi,
  2. Body bj
)

Get an element

Implementation

double get(Body bi, Body  bj) {
  int i = bi.index;
  int j = bj.index;
  if (j > i) {
    final temp = j;
    j = i;
    i = temp;
  }
  return matrix[((i * (i + 1)) >> 1) + j - 1];
}