DescriptionUse 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
Committed: https://crrev.com/d932f9ab78a0e790b4228b70a48e4fc6cac31e49
Cr-Commit-Position: refs/heads/master@{#420584}
Patch Set 1 #Patch Set 2 : Compile and ordering #Messages
Total messages: 11 (6 generated)
|