```python
import math

def angle_complex(a, b):
  """
  Calculates the angle (in radians) of a complex number a + bi.

  The angle, also known as the argument or phase, is the counterclockwise
  angle from the positive real axis to the point (a, b) in the complex plane.

  Args:
    a: The real part of the complex number.
    b: The imaginary part of thecomplex number.

  Returns:
    The angle of the complex number in radians, in the range (-pi, pi].
  """
  return math.atan2(b, a)

```