Use approximation when comparing Length floats in DCHECK
The original DCHECK was asserting on float equality. This was too strict and was firing for small negligible differences. This change flattens specified Lengths into a single float and compares them with a constant slack allowance. This check is intended to pick up on differences like -5 vs 0 due to different clamping behaviour, small differences in floating point arithmetic is fine. BUG=649525 Review-Url: https://codereview.chromium.org/2366823003 Cr-Commit-Position: refs/heads/master@{#420584}
Showing
Please register or sign in to comment