getAxis method

double getAxis(
  1. Axis axis
)

Get an axis value. For OO patterns.

Implementation

double getAxis(Axis axis)
{
  switch (axis)
  {
    case Axis.X:
      return x;
    case Axis.Y:
      return y;
    default:
      throw IllegalArgumentException();
  }
}