Bonjour à tous,

J'ai développé un code pour faire de l'interpolation bilinéaire à partir de https://fr.wikipedia.org/wiki/Interp...ilin%C3%A9aire
Pourriez-vous m'indiquer un moyen pour optimiser mon code s'il vous plaît ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
 
float bilinearInterpolation(float dx, float dy, float deltaX, float deltaY, float deltaFx, float deltaFy, float deltaFxy, float fX1Y1)
{
  //Precondition
  assert(deltaX > 0);
  assert(deltaY > 0);
 
  assert(dx >= 0.);
  assert(dy >= 0.);
 
  float res;
 
  res = deltaFx*(dx/deltaX) + deltaFy*(dy/deltaY) 
    + deltaFxy*(dx*dy/(deltaX*deltaY)) + fX1Y1;
 
  return res;
}