* The two vectors involved may be the same.
*/
-#include "mat3.h"
+#include <Math/mat3.h>
#ifndef TRUE
# define TRUE 1
# define FALSE 0
#endif
+#if !defined( USE_XTRA_MAT3_INLINES )
void
-MAT3mult_vec(result_vec, vec, mat)
-MAT3vec result_vec;
-register MAT3vec vec;
-register MAT3mat mat;
+MAT3mult_vec(double *result_vec, register double *vec, register double (*mat)[4])
{
MAT3vec tempvec;
register double *temp = tempvec;
MAT3_COPY_VEC(result_vec, temp);
}
+#endif // !defined( USE_XTRA_MAT3_INLINES )
/*
* Multiplies a vector of size 4 by a matrix, setting the result vector.
*/
int
-MAT3mult_hvec(result_vec, vec, mat, normalize)
-MAT3hvec result_vec;
-register MAT3hvec vec;
-register MAT3mat mat;
+MAT3mult_hvec(double *result_vec, register double *vec, register double (*mat)[4], int normalize)
{
MAT3hvec tempvec;
double norm_fac;
return(ret);
}
+#if !defined( USE_XTRA_MAT3_INLINES )
+
/*
* Sets the first vector to be the cross-product of the last two vectors.
*/
void
-MAT3cross_product(result_vec, vec1, vec2)
-MAT3vec result_vec;
-register MAT3vec vec1, vec2;
+MAT3cross_product(double *result_vec, register double *vec1, register double *vec2)
{
MAT3vec tempvec;
register double *temp = tempvec;
MAT3_COPY_VEC(result_vec, temp);
}
+#endif // !defined( USE_XTRA_MAT3_INLINES )
/*
* Finds a vector perpendicular to vec and stores it in result_vec.
#define SELECT .7071 /* selection constant (roughly .5*sqrt(2) */
void
-MAT3perp_vec(result_vec, vec, is_unit)
-MAT3vec result_vec, vec;
-int is_unit;
+MAT3perp_vec(double *result_vec, double *vec, int is_unit)
{
MAT3vec norm;
double dot;