libgravix2  0.1.0
A fast simulation of attractive forces acting on point-like particles embedded onto the surface of a sphere.
linalg.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
15 struct GrvxVec3D {
16  double x, y, z;
17 };
18 
26 double grvx_dot(struct GrvxVec3D a, struct GrvxVec3D b);
27 
34 double grvx_mag(struct GrvxVec3D v);
35 
36 #ifdef __cplusplus
37 } // extern "C"
38 #endif
double grvx_mag(struct GrvxVec3D v)
Magnitude of vector.
Definition: linalg.c:10
double grvx_dot(struct GrvxVec3D a, struct GrvxVec3D b)
Dot product of a and b.
Definition: linalg.c:5
3D vector in cartesian representation.
Definition: linalg.h:15
double y
Definition: linalg.h:16
double x
Definition: linalg.h:16
double z
Definition: linalg.h:16