Aller au contenu

Mathc initiation/Fichiers h : str plt

Un livre de Wikilivres.
Version datée du 16 avril 2020 à 10:07 par DannyS712 (discussion | contributions) (<source> -> <syntaxhighlight> (phab:T237267))


Installer ce fichier dans votre répertoire de travail.

zstrplt.h
/* ------------------------------------ */
/*  Save as :   zstrplt.h               */
/* ------------------------------------ */

/* ------------------------------------ */
typedef struct
{
 double xmini;  double xmaxi;
 double ymini;  double ymaxi;

}W_Ctrl, *PW_Ctrl;
/* ------------------------------------ */
W_Ctrl i_Winplot(
 double xmini,  double xmaxi,
 double ymini,  double ymaxi
)
{
W_Ctrl w = {xmini,xmaxi,ymini,ymaxi};

return (w);}
/* ------------------------------------ */

/* ------------------------------------ */
typedef struct
{
 double xmini;  double xmaxi;
 double step;

}x_Ctrl, *Px_Ctrl;
/* ------------------------------------ */
x_Ctrl i_xStep(
 double xmini,  double xmaxi,
 double step
)
{
x_Ctrl xvalue = {xmini,xmaxi,step};

return (xvalue);}

Les structures sont suivies par les fonctions qui vont nous permettre d'initialiser ces structures dans les fonctions graphiques.