added check for division by zero in angcalc.cpp