vector property
The raw (dx, dy) vector for this direction. See the extension docs for
the coordinate convention and normalization note.
Implementation
(double, double) get vector => switch (this) {
SweepDirection.topLeftToBottomRight => (1.0, 1.0),
SweepDirection.bottomRightToTopLeft => (-1.0, -1.0),
SweepDirection.leftToRight => (1.0, 0.0),
SweepDirection.rightToLeft => (-1.0, 0.0),
SweepDirection.topToBottom => (0.0, 1.0),
SweepDirection.bottomToTop => (0.0, -1.0),
SweepDirection.topRightToBottomLeft => (-1.0, 1.0),
SweepDirection.bottomLeftToTopRight => (1.0, -1.0),
};