flipAxis function

Axis flipAxis(
  1. Axis direction
)

Returns the opposite of the given Axis.

Specifically, returns Axis.horizontal for Axis.vertical, and vice versa.

See also:

Implementation

Axis flipAxis(Axis direction) {
  return switch (direction) {
    Axis.horizontal => Axis.vertical,
    Axis.vertical => Axis.horizontal,
  };
}