directionExtent method

double directionExtent(
  1. AxisDirection direction
)

Returns the extent from origin towards direction.

Implementation

double directionExtent(AxisDirection direction) {
  if (direction == AxisDirection.up) {
    return -dy;
  } else if (direction == AxisDirection.right) {
    return dx;
  } else if (direction == AxisDirection.down) {
    return dy;
  } else {
    return -dx;
  }
}