Modify vec_copy so it supports float[]
This commit is contained in:
parent
04720aa4a3
commit
bb6c9efc50
|
@ -22,10 +22,11 @@ typedef struct {
|
||||||
#define gl_drawline_points(p0, p1, w, col) \
|
#define gl_drawline_points(p0, p1, w, col) \
|
||||||
gl_drawline(p0[0], p0[1], p1[0], p1[1], w, col);
|
gl_drawline(p0[0], p0[1], p1[0], p1[1], w, col);
|
||||||
|
|
||||||
|
/* Use indexes so it works for float[] as well as vec3_t */
|
||||||
#define vec_copy(dst, src) \
|
#define vec_copy(dst, src) \
|
||||||
dst.x = src.x; \
|
dst[0] = src[0]; \
|
||||||
dst.y = src.y; \
|
dst[1] = src[1]; \
|
||||||
dst.z = src.z;
|
dst[2] = src[2];
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue