The total offset in the given direction.
double along(Axis axis) { return switch (axis) { Axis.horizontal => horizontal, Axis.vertical => vertical, }; }