File: vector.h

package info (click to toggle)
jack-tools 20131226-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 712 kB
  • sloc: ansic: 6,183; makefile: 105; lisp: 54
file content (16 lines) | stat: -rw-r--r-- 274 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef _VECTOR_H
#define _VECTOR_H

#include "float.h"

typedef struct { f32 x, y, z;} v32;

v32 make_v32(f32 x, f32 y, f32 z);
v32 vmul(f32 s, v32 v);
v32 vadd(v32 a, v32 b);
v32 vsub(v32 a, v32 b);
f32 vdot(v32 a, v32 b);
f32 vlength(v32 v);
v32 vunitise(v32 v);

#endif