Move cc::MathUtil::ApproximatelyEqual() from cc/base/math_util.h to base/numerics/ranges.h

This CL moves the utility function cc::MathUtil::ApproximatelyEqual() from
//cc/base/math_util.h to //base/numerics/ranges.h, so that it can be used
from folders that don't need/ can't to depend on //cc.

It also adds an static_assert for std::is_arithmetic<>, and removes the
DCHECK internal (because we don't depend on base/logging.h inside
base/numerics).

Bug: 771345
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I2617abe630774c3148df1507afcb57257ed394bc
Reviewed-on: https://chromium-review.googlesource.com/704208
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507807}

CrOS-Libchrome-Original-Commit: 92f328e4ab805bcefc5d5a5b1e2fc975886b06e8
1 file changed
tree: df7106cc3d757919a146daecbd0035feb6818705
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/