along method

double along(
  1. Axis axis
)

The total offset in the given direction.

Implementation

double along(Axis axis) {
  return switch (axis) {
    Axis.horizontal => horizontal,
    Axis.vertical   => vertical,
  };
}