```python
if count == 0:
    return PVector(0, 0)
sum.div(float(count))
# etc.
```