Commit Graph

3 Commits

Author SHA1 Message Date
Mike Klein
f60a76e2ac switch SkTPin impl to pin NaN to lo
It's just much easier to remember and think about
max(lo, min(x, hi)) than max(min(hi, x), lo), and
both pin NaN to one of the two limits.  I'm not sure
if anything in Skia depends on which limit we pin to.

Change-Id: Iceca36a8fffd7072180e82b8b6eb81cbdb5ac97f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327788
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2020-10-16 21:08:51 +00:00
Mike Klein
137068d837 impl SkTPin with std::{min,max}
Change-Id: I70b2fdea570a9091afc81a1455fa61f90b0357a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327786
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-16 21:01:01 +00:00
Mike Klein
8aa0edfed2 move SkTPin to include/private
Change-Id: Ib0dc823d331a7cddc5da1d1be83136ce803a7871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/327783
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-10-16 19:45:11 +00:00