/simpletypesystem/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/simpletypesystem/trunk

« back to all changes in this revision

Viewing changes to src/vec.c

  • Committer: Gustav Hartvigsson
  • Date: 2015-03-26 11:15:22 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20150326111522-k6fq5kdbrvoeucok
* added skeleton for the SBox type.
  An SBox is a way of boxing non-SObject types in a reference-counted way.

* Added a few vector types in vec.h and vec.c.
  Still needs work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "vec.h"
 
2
 
 
3
Vec3 * vec3_new (int a, int b, int c) {
 
4
  Vec3 * self = malloc (sizeof (Vec3));
 
5
  self->a = a;
 
6
  self->b = b;
 
7
  self->c = c;
 
8
}
 
9
 
 
10
Vec3_16 * vec3_16_new (int16_t a, int16_t b, int16_t c) {
 
11
  Vec3 * self = malloc (sizeof (Vec3_16));
 
12
  self->a = a;
 
13
  self->b = b;
 
14
  self->c = c;
 
15
}