makeDivisible method
void
makeDivisible()
replace all zeros with a value close to zero to allow safe elementwise division
Implementation
void makeDivisible() {
for (int i = 0; i < length; i++) {
this[i] = (this[i] == 0) ? 0.001 : this[i];
}
}