All pastes #90476 Raw Edit

Someone

public text v1 · immutable
#90476 ·published 2006-07-17 18:34 UTC
rendered paste body
WHY THIS?

typedef struct ScePspIVector3 {
	int 	x;
	int 	y;
	int 	z;
} ScePspIVector3;

typedef struct ScePspFVector3 {
	float 	x;
	float 	y;
	float 	z;
} ScePspFVector3;

typedef union ScePspVector3 {
	ScePspFVector3 	fv;
	ScePspIVector3 	iv;
	float 			f[3];
	int 			i[3];
} ScePspVector3;

INSTEAD OF THIS

typedef union ScePspFVector3 {
	struct { float x, y, z; };
	float arr[3];
};

typedef union ScePspIVector3 {
	struct { int x, y, z; };
	int arr[3];
};

typedef struct ScePspVector3 {
	ScePspFVector3 f;
	ScePspIVector3 i;
};