Fixed NaN value in angle. Original implementation led to division by
zero.