sum method

double sum(
  1. Axis axis
)

Get sum of values on axis.

Implementation

double sum(Axis axis)
{
  switch (axis)
  {
    case Axis.X:
      return left + right;
    case Axis.Y:
      return top + bottom;
    default:
      throw new IllegalArgumentException();
  }
}