Mathc gnuplot/Fichiers h : xspv
Apparence
Préambule
[modifier | modifier le wikicode]Installez ce fichier dans votre répertoire de travail.
xspv.h Définition des types de points et de vecteurs |
---|
/* ------------------------------------ */
/* Save as : xspv.h */
/* ------------------------------------ */
typedef struct
{
double x; double y;
}point2d, *Ppoint2d;
/* ------------------------------------ */
point2d i_point2d(
double x, double y
)
{
point2d p = {x,y};
return (p);}
/* ------------------------------------ */
typedef struct
{
double x; double y; double z;
}point3d, *Ppoint3d;
/* ------------------------------------ */
point3d i_point3d(
double x, double y, double z
)
{
point3d p = {x,y,z};
return (p);}
/* ------------------------------------ */
typedef struct
{
double i; double j;
}vector2d, *Pvector2d;
/* ------------------------------------ */
vector2d i_vector2d(
double i, double j
)
{
vector2d v = {i,j};
return (v);}
/* ------------------------------------ */
typedef struct
{
double i; double j; double k;
}vector3d, *Pvector3d;
/* ------------------------------------ */
vector3d i_vector3d(
double i, double j, double k
)
{
vector3d v = {i,j,k};
return (v);}