|
S2kit
1.1
Toolkit for working with functions defined on the sphere
|
Vector arithmetic operations. More...
#include "vector_funcs.h"Go to the source code of this file.
Functions | |
| void | vec_add (double *v1, double *v2, double *result, const int len) |
| Adds two vectors into a third one. More... | |
| void | vec_mul (const double scalar, double *v, double *result, const int len) |
Multiplies the vector v by scalar. More... | |
| void | vec_dot (double *v1, double *v2, double *result, const int len) |
Performs dot product of v1 and v2. More... | |
Vector arithmetic operations.
Definition in file vector_funcs.c.
| void vec_add | ( | double * | v1, |
| double * | v2, | ||
| double * | result, | ||
| const int | len | ||
| ) |
Adds two vectors into a third one.
result = v1 + v2
| v1 | first vector |
| v2 | second vector |
| result | result vector |
| len | length of all vectors |
Definition at line 18 of file vector_funcs.c.
| void vec_dot | ( | double * | v1, |
| double * | v2, | ||
| double * | result, | ||
| const int | len | ||
| ) |
Performs dot product of v1 and v2.
result = v1 * v2
| v1 | first vector |
| v2 | second vector |
| result | result vector |
| len | length of all vectors |
Definition at line 53 of file vector_funcs.c.
| void vec_mul | ( | const double | scalar, |
| double * | v, | ||
| double * | result, | ||
| const int | len | ||
| ) |
Multiplies the vector v by scalar.
result = scalar * v
| scalar | scalar |
| v | vector |
| result | result vector |
| len | length of both vectors |
Definition at line 33 of file vector_funcs.c.