vector2d.c 263 B

1234567891011121314
  1. #include "vector2d.h"
  2. #include <stdlib.h>
  3. struct dd_vector2d *dd_vector2d_create() {
  4. struct dd_vector2d *w = malloc(sizeof(struct dd_vector2d));
  5. dd_vector2d_init(w);
  6. return w;
  7. }
  8. void dd_vector2d_init(struct dd_vector2d *this) {
  9. this->x = 0;
  10. this->y = 0;
  11. }