Flutter Engine
The Flutter Engine
|
Go to the source code of this file.
Functions | |
SkScalar | SkScalarInterpFunc (SkScalar searchKey, const SkScalar keys[], const SkScalar values[], int length) |
SkScalar SkScalarInterpFunc | ( | SkScalar | searchKey, |
const SkScalar | keys[], | ||
const SkScalar | values[], | ||
int | length | ||
) |
Interpolate along the function described by (keys[length], values[length]) for the passed searchKey. SearchKeys outside the range keys[0]-keys[Length] clamp to the min or max value. This function assumes the number of pairs (length) will be small and a linear search is used.
Repeated keys are allowed for discontinuous functions (so long as keys is monotonically increasing). If key is the value of a repeated scalar in keys the first one will be used.
Definition at line 11 of file SkScalar.cpp.