ftp.nice.ch/pub/next/graphics/3d/geomview.1.4.1.s.tar.gz#/Geomview/src/bin/geomutil/ucd/vec4.h

This is vec4.h in view mode; [Download] [Up]

#define VSUB3(p0, p1, p2)		\
    { (p2)->x  = (p1)->x - (p0)->x;		\
    (p2)->y  = (p1)->y - (p0)->y;		\
    (p2)->z  = (p1)->z - (p0)->z;  }

#define VDOT3(p0, p1)		\
    ((p0)->x*(p1)->x + (p0)->y*(p1)->y + (p0)->z*(p1)->z)

#define NORMALIZE3(xx)	\
	{float x = sqrt((xx)->x*(xx)->x + (xx)->y*(xx)->y +(xx)->z*(xx)->z); \
	if (x == 0) x = 1.0;	\
	x = 1.0/x;		\
	(xx)->x	*= x;   (xx)->y *= x;   (xx)->z *= x;}	

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.