#include <math.h>
#include <gandalf/linalg/2vector.h>
#include <gandalf/common/misc_defs.h>
#include <gandalf/common/misc_error.h>
#include <string.h>
#include <gandalf/common/endian_io.h>
Functions | |
Gan_Bool | gan_vec2_print (const Gan_Vector2 *p, const char *prefix, int indent, const char *fmt) |
Print fixed size vector to standard output. | |
Gan_Bool | gan_vec2_fwrite (FILE *fp, const Gan_Vector2 *p, gan_uint32 magic_number) |
Write fixed size vector to file stream. | |
Gan_Bool | gan_vec2_fread (FILE *fp, Gan_Vector2 *p, gan_uint32 *magic_number) |
Read fixed size vector from file stream. | |
Gan_Vector2 | gan_vec2_zero_s (void) |
Set fixed size vector to zero. | |
Gan_Vector2 | gan_vec2_copy_s (const Gan_Vector2 *x) |
Return a copy of fixed size vector. | |
Gan_Vector2 | gan_vec2_scale_s (const Gan_Vector2 *x, const double a) |
Scale fixed size vector. | |
Gan_Vector2 | gan_vec2_divide_s (const Gan_Vector2 *x, const double a) |
Divide fixed size vector by scalar. | |
Gan_Vector2 | gan_vec2_negate_s (const Gan_Vector2 *x) |
Negate fixed size vector. | |
Gan_Vector2 * | gan_vec2_unit_q (Gan_Vector2 *x, Gan_Vector2 *y) |
Scale matrix to unit norm. | |
Gan_Vector2 | gan_vec2_unit_s (const Gan_Vector2 *x) |
Scale matrix to unit norm. | |
Gan_Vector2 | gan_vec2_add_s (const Gan_Vector2 *x, const Gan_Vector2 *y) |
Add two fixed size vectors. | |
Gan_Vector2 | gan_vec2_sub_s (const Gan_Vector2 *x, const Gan_Vector2 *y) |
Subtract two fixed size vectors. | |
double | gan_vec2_dot_s (const Gan_Vector2 *p, const Gan_Vector2 *q) |
Dot product of fixed size vectors. | |
double | gan_vec2_sqrlen_s (const Gan_Vector2 *p) |
Returns sum of squares of vector elements. | |
Gan_Vector2 | gan_vec2_from_vec_s (const Gan_Vector *x) |
Convert generic rectangular vector to fixed size vector structure. | |
Gan_Bool | gan_vec2_fprint (FILE *fp, const Gan_Vector2 *p, const char *prefix, int indent, const char *fmt) |
Print 2-vector to file. | |
Gan_Bool | gan_vec2_fscanf (FILE *fp, Gan_Vector2 *p, char *prefix, int prefix_len) |
Read 2-vector from file. | |
Gan_Vector2 | gan_vec2_fill_s (double X, double Y) |
Return 2-vector filled with values. | |
Gan_Vector2 * | gan_vec2_from_vec_q (const Gan_Vector *x, Gan_Vector2 *a) |
Convert generic vector to 2-vector structure. |
Part of: Gandalf Library