PageSourceSearch

https://libregraphicsmeeting.org/2026/js/culori-4.0.1/src/interpolate/lerp.js

js libregraphicsmeeting.org collected 2026-10-02 02:41:37 UTC 446 bytes, 28 lines download raw bytes

vendor: 446 bytes, lines 1-28
1const lerp = (a, b, t) => a + t * (b - a);
2const unlerp = (a, b, v) => (v - a) / (b - a);
3
4const blerp = (a00, a01, a10, a11, tx, ty) => {
5	return lerp(lerp(a00, a01, tx), lerp(a10, a11, tx), ty);
6};
7
8const trilerp = (
9	a000,
10	a010,
11	a100,
12	a110,
13	a001,
14	a011,
15	a101,
16	a111,
17	tx,
18	ty,
19	tz
20) => {
21	return lerp(
22		blerp(a000, a010, a100, a110, tx, ty),
23		blerp(a001, a011, a101, a111, tx, ty),
24		tz
25	);
26};
27
28export { lerp, blerp, trilerp, unlerp };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.