comparison Framework/Toolbox/GeometryToolbox.h @ 171:01e32beee56c wasm

upgrade to cairo 1.14.12
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 06 Mar 2018 15:43:57 +0100
parents 8d50e6be565d
children 316324f42848
comparison
equal deleted inserted replaced
170:0261909fa6f0 171:01e32beee56c
129 float f00, 129 float f00,
130 float f01, 130 float f01,
131 float f10, 131 float f10,
132 float f11) 132 float f11)
133 { 133 {
134 // This function works on fractional parts 134 // This function only works on fractional parts
135 assert(x >= 0 && y >= 0 && x < 1 && y < 1); 135 assert(x >= 0 && y >= 0 && x < 1 && y < 1);
136 136
137 // https://en.wikipedia.org/wiki/Bilinear_interpolation#Unit_square 137 // https://en.wikipedia.org/wiki/Bilinear_interpolation#Unit_square
138 return f00 * (1 - x) * (1 - y) + f01 * x * (1 - y) + f10 * (1 - x) * y + f11 * x * y; 138 return f00 * (1 - x) * (1 - y) + f01 * x * (1 - y) + f10 * (1 - x) * y + f11 * x * y;
139 } 139 }