Mathc initiation/Fichiers h : c59a6


Sommaire


Installer ce fichier dans votre répertoire de travail.

Crystal Clear mimetype source h.png x_fxyz.h
'
/* ---------------------------------- */
/* save as x_fxyz.h                  */
/* ---------------------------------- */
double fxyz_x(
double (*P_f)(double x, double y, double z),
double   h,
p3d  p
)
{
double tplsh;
double tmnsh;

 tplsh = ((*P_f)(p.x+h,p.y,p.z));
 tmnsh = ((*P_f)(p.x-h,p.y,p.z));

 return(( tplsh-tmnsh)/(2.*h) );
}
/* ---------------------------------- */
double fxyz_y(
double (*P_f)(double x, double y, double z),
double   h,
p3d  p
)
{
double tplsh;
double tmnsh;

 tplsh = ((*P_f)(p.x,p.y+h,p.z));
 tmnsh = ((*P_f)(p.x,p.y-h,p.z));

 return(( tplsh-tmnsh)/(2.*h) );
}
/* ---------------------------------- */
double fxyz_z(
double (*P_f)(double x, double y, double z),
double   h,
p3d  p
)
{
double tplsh;
double tmnsh;

 tplsh = ((*P_f)(p.x,p.y,p.z+h));
 tmnsh = ((*P_f)(p.x,p.y,p.z-h));

 return(( tplsh-tmnsh)/(2.*h) );
}
/* ---------------------------------- */
/* ---------------------------------- */


Déclaration des fichiers h.