Use Clamped math in CubicBezierTimingFunction
The CubicBezierTimingFunction::GetValue and Velocity uses static_cast that cast a double to float. This is not safe when the double is a very big number and could result in float-cast-overflow. This CL fixes it by using clamped math, which would clamp the value to float range. Bug: 925513 Change-Id: If29fe00c4d3ea4c7ca93c96878ab898d7ec8d6f3 Reviewed-on: https://chromium-review.googlesource.com/c/1438649Reviewed-by:Stephen McGruer <smcgruer@chromium.org> Commit-Queue: Xida Chen <xidachen@chromium.org> Cr-Commit-Position: refs/heads/master@{#626633}
Showing
Please register or sign in to comment