along method

double along (Axis axis)

The total offset in the given direction.

Implementation

double along(Axis axis) {
  assert(axis != null);
  switch (axis) {
    case Axis.horizontal:
      return horizontal;
    case Axis.vertical:
      return vertical;
  }
  return null;
}