```python
def diameter_circle(r):
  """
  Calculates the diameter of a circle given its radius.

  Args:
    r: The radius of the circle.

  Returns:
    The diameter of the circle.
  """
  diameter = 2 * r
  return diameter
```