#include <math.h>
#include <gandalf/linalg/3vectorf.h>
#include <gandalf/linalg/4vectorf.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_vec4f_print (const Gan_Vector4_f *p, const char *prefix, int indent, const char *fmt) |
Print fixed size vector to standard output. | |
Gan_Bool | gan_vec4f_fwrite (FILE *fp, const Gan_Vector4_f *p, gan_uint32 magic_number) |
Write fixed size vector to file stream. | |
Gan_Bool | gan_vec4f_fread (FILE *fp, Gan_Vector4_f *p, gan_uint32 *magic_number) |
Read fixed size vector from file stream. | |
Gan_Vector4_f | gan_vec4f_zero_s (void) |
Set fixed size vector to zero. | |
Gan_Vector4_f | gan_vec4f_copy_s (const Gan_Vector4_f *x) |
Return a copy of fixed size vector. | |
Gan_Vector4_f | gan_vec4f_scale_s (const Gan_Vector4_f *x, const float a) |
Scale fixed size vector. | |
Gan_Vector4_f | gan_vec4f_divide_s (const Gan_Vector4_f *x, const float a) |
Divide fixed size vector by scalar. | |
Gan_Vector4_f | gan_vec4f_negate_s (const Gan_Vector4_f *x) |
Negate fixed size vector. | |
Gan_Vector4_f * | gan_vec4f_unit_q (Gan_Vector4_f *x, Gan_Vector4_f *y) |
Scale matrix to unit norm. | |
Gan_Vector4_f | gan_vec4f_unit_s (const Gan_Vector4_f *x) |
Scale matrix to unit norm. | |
Gan_Vector4_f | gan_vec4f_add_s (const Gan_Vector4_f *x, const Gan_Vector4_f *y) |
Add two fixed size vectors. | |
Gan_Vector4_f | gan_vec4f_sub_s (const Gan_Vector4_f *x, const Gan_Vector4_f *y) |
Subtract two fixed size vectors. | |
float | gan_vec4f_dot_s (const Gan_Vector4_f *p, const Gan_Vector4_f *q) |
Dot product of fixed size vectors. | |
float | gan_vec4f_sqrlen_s (const Gan_Vector4_f *p) |
Returns sum of squares of vector elements. | |
Gan_Vector4_f | gan_vec4f_from_vecf_s (const Gan_Vector_f *x) |
Convert generic rectangular vector to fixed size vector structure. | |
Gan_Bool | gan_vec4f_fprint (FILE *fp, const Gan_Vector4_f *p, const char *prefix, int indent, const char *fmt) |
Print 4-vector to file. | |
Gan_Bool | gan_vec4f_fscanf (FILE *fp, Gan_Vector4_f *p, char *prefix, int prefix_len) |
Read 4-vector from file. | |
Gan_Vector4_f | gan_vec4f_fill_s (float X, float Y, float Z, float W) |
Return 4-vector filled with values. | |
Gan_Vector3_f | gan_vec4f_get_v3t_s (const Gan_Vector4_f *p) |
Extract top 3-vector part of 4-vector. | |
Gan_Vector4_f | gan_vec4f_set_parts_s (const Gan_Vector3_f *q, float s) |
Build 4-vector from 3-vector and scalar. | |
Gan_Vector4_f | gan_vec4f_set_blocks_s (const Gan_Vector2_f *q, const Gan_Vector2_f *r) |
Macro: Build 4-vector from two 2-vectors. | |
Gan_Vector4_f * | gan_vec4f_from_vecf_q (const Gan_Vector_f *x, Gan_Vector4_f *a) |
Convert generic vector to 4-vector structure. |
Part of: Gandalf Library