X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Frasterize;a=blobdiff_plain;f=vec.h;h=15de4845c5f87843f4c8a37390d33e385b4b0ae8;hp=2634de621fc590366e61e3a109188eb817de3e54;hb=bc662e293c854e1bdc9d46e9a410fe220247e6d4;hpb=07083c8dfbbd4fe48e84d86ce8d7e44e0719b84a 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. */