X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=vec.h;h=15de4845c5f87843f4c8a37390d33e385b4b0ae8;hb=bc662e293c854e1bdc9d46e9a410fe220247e6d4;hp=2634de621fc590366e61e3a109188eb817de3e54;hpb=3955aa40277c4b86a43b21e78d55d2fea7b643ce;p=chaz%2Frasterize diff --git a/vec.h b/vec.h index 2634de6..15de484 100644 --- a/vec.h +++ b/vec.h @@ -64,6 +64,16 @@ vec_t vec_new(scal_t x, scal_t y, scal_t z) #define VEC_ZERO_FREE vec_new2(S(0.0), S(0.0), S(0.0), S(0.0)) +/* + * Get a pointer to the vector data. + */ +INLINE_MAYBE +const scal_t* vec_data(const vec_t* v) +{ + return &v->x; +} + + /* * Print the vector to stdout. */