Enforce single responsibility in diameter calculation.