Use nextafter instead of nexttoward to avoid using long double calculation.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1621453004

Review URL: https://codereview.chromium.org/1621453004
This commit is contained in:
herb 2016-01-22 10:11:03 -08:00 committed by Commit bot
parent f1b8b6ae34
commit 0d2bc849f9

View File

@ -45,10 +45,10 @@ public:
// If newMaxRadius forces the total over the limit, then it needs to be
// reduced by one ULP to be less than limit - newMinRadius.
// Note: nexttowardf is a c99 call and should be std::nexttoward, but this is not
// implemented in the ARM compiler.
// Note: nextafterf is a c99 call and should be std::nextafter, but this is not
// implemented in the GCC ARM compiler.
if (newMaxRadius + newMinRadius > limit) {
newMaxRadius = nexttowardf(newMaxRadius, 0.0);
newMaxRadius = nextafterf(newMaxRadius, 0.0f);
}
*maxRadius = newMaxRadius;
}