fix compile warning by replacing C-style fabs with std::abs, take 2