Prevent casting negative charge to unsigned int
Fixes issue found and reported by @tbisanz.
Lesson learned: think instead of blindly casting double
s that could well be negative to unsigned int
.
Unfortunately this makes the nice 2^32-1
charge depositions go away...