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

  Args:
    r: The radius of the circle (a non-negative number).

  Returns:
    The diameter of the circle.
  """
  if r < 0:
    raise ValueError("Radius cannot be negative")
  return 2 * r

```