|
-
June 27th, 2001, 06:12 AM
#1
Converting C code to Fortran
I have got a sample C code something like this. Please
let me know how to convert this C code into Fortran.
Reply me back at [email protected].
Thanks in advance.
Pavan
------------------------------------------------------
#define X 0
#define Y 1
#define Z 2
typedef struct tVertexStructure tsVertex;
typedef tsVertex *tVertex;
typedef struct tEdgeStructure tsEdge;
typedef tsEdge *tEdge;
typedef struct tFaceStructure tsFace;
typedef tsFace *tFace;
struct tVertexStructure {
int v[3];
int vnum;
tEdge duplicate;
tVertex next, prev;
};
struct tEdgeStructure {
tFace adjface[2];
tVertex endpts[2];
tFace newface;
tEdge next, prev;
};
struct tFaceStructure {
tEdge edge[3];
tVertex vertex[3];
tFace next, prev;
};
int Normz( tFace f )
{
tVertex a, b, c;
a = f->vertex[0];
b = f->vertex[1];
c = f->vertex[2];
return
( b->v[X] - a->v[X] ) * ( c->v[Y] - a->v[Y] ) -
( b->v[Y] - a->v[Y] ) * ( c->v[X] - a->v[X] );
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|