3D Vectors

Double precision

union ksl_vec3_t
#include <vector.h>

3 dimensional double precision vector

Public Members

double at[3]
struct ksl_vec3_t::[anonymous] [anonymous]

anonymous union allows accessing vector quantities at specified index

double x
double y
double z
struct ksl_vec3_t::[anonymous] [anonymous]

anonymous union allows accessing vector quantities by descriptive name

ksl_vec3_t ksl_vec3(const double x, const double y, const double z)

vec3 constructor

ksl_vec3_t *ksl_vec3_alloc(int)

initialize n ksl_vec3_t double precision vectors datastructures on the heap

double ksl_vec3_l2norm(const ksl_vec3_t *v)
void ksl_vec3_normalize(ksl_vec3_t *v)
void ksl_vec3_normalized(const ksl_vec3_t *v, ksl_vec3_t *vo)
void ksl_vec3_scale(ksl_vec3_t *v, const double)
void ksl_vec3_scaled(const ksl_vec3_t *v, const double, ksl_vec3_t *vo)
void ksl_vec3_copy(const ksl_vec3_t *vi, ksl_vec3_t *vo)
void ksl_vec3_swap(ksl_vec3_t *v1, ksl_vec3_t *v2)
void ksl_vec3_inverted(const ksl_vec3_t *vi, ksl_vec3_t *vo)
void ksl_vec3_invert(ksl_vec3_t *vi)
double ksl_dot_vv(const ksl_vec3_t *vi0, const ksl_vec3_t *vi1)
void ksl_product_av(const double ki, const ksl_vec3_t *vi, ksl_vec3_t *vo)
void ksl_product_avinv(const double ki, const ksl_vec3_t *vi, ksl_vec3_t *vo)
void ksl_product_ainvv(const double ki, const ksl_vec3_t *vi, ksl_vec3_t *vo)
void ksl_add_vv(const ksl_vec3_t *v1i, const ksl_vec3_t *v2i, ksl_vec3_t *vo)
void ksl_subtract_vv(const ksl_vec3_t *v1i, const ksl_vec3_t *v2i, ksl_vec3_t *vo)
void ksl_axpy_vv(const double scalar, const ksl_vec3_t *v1x, ksl_vec3_t *v2y)
void ksl_nxpy_vv(const ksl_vec3_t *v1x, ksl_vec3_t *v2y)
void ksl_xpy_vv(const ksl_vec3_t *v1x, ksl_vec3_t *v2y)
void ksl_cross_vv(const ksl_vec3_t *v1i, const ksl_vec3_t *v2i, ksl_vec3_t *vo)
void ksl_cross_vvinv(const ksl_vec3_t *v1i, const ksl_vec3_t *v2i, ksl_vec3_t *vo)
void ksl_add_vvx(const ksl_vec3_t *t1i, const double t2i, ksl_vec3_t *to)
void ksl_add_vvxinv(const ksl_vec3_t *t1i, const double t2i, ksl_vec3_t *to)
void ksl_add_vvy(const ksl_vec3_t *t1i, const double t2i, ksl_vec3_t *to)
void ksl_add_vvyinv(const ksl_vec3_t *t1i, const double t2i, ksl_vec3_t *to)
void ksl_add_vvz(const ksl_vec3_t *t1i, const double t2i, ksl_vec3_t *to)
void ksl_add_vvzinv(const ksl_vec3_t *t1i, const double t2i, ksl_vec3_t *to)

Single precision

union ksl_vec3f_t
#include <vector.h>

3 dimensional single precision vector

Public Members

float at[3]
struct ksl_vec3f_t::[anonymous] [anonymous]

anonymous union allows accessing vector quantities at specified index

float x
float y
float z
struct ksl_vec3f_t::[anonymous] [anonymous]

anonymous union allows accessing vector quantities by descriptive name

ksl_vec3f_t ksl_vec3f(const float x, const float y, const float z)

vec3f constructor

ksl_vec3f_t *ksl_vec3f_alloc(int)

initialize n ksl_vec3f_t single precision vectors datastructures on the heap

float ksl_vec3f_l2norm(const ksl_vec3f_t *v)
void ksl_vec3f_normalize(ksl_vec3f_t *v)
void ksl_vec3f_normalized(const ksl_vec3f_t *v, ksl_vec3f_t *vo)
void ksl_vec3f_scale(ksl_vec3f_t *v, const float)
void ksl_vec3f_scaled(const ksl_vec3f_t *v, const float, ksl_vec3f_t *vo)
void ksl_vec3f_copy(const ksl_vec3f_t *vi, ksl_vec3f_t *vo)
void ksl_vec3f_swap(ksl_vec3f_t *v1, ksl_vec3f_t *v2)
void ksl_vec3f_inverted(const ksl_vec3f_t *vi, ksl_vec3f_t *vo)
void ksl_vec3f_invert(ksl_vec3f_t *vi)
float ksl_dot_vvf(const ksl_vec3f_t *vi0, const ksl_vec3f_t *vi1)
void ksl_product_avinvf(const float ki, const ksl_vec3f_t *vi, ksl_vec3f_t *vo)
void ksl_product_avf(const float ki, const ksl_vec3f_t *vi, ksl_vec3f_t *vo)
void ksl_add_vvf(const ksl_vec3f_t *v1i, const ksl_vec3f_t *v2i, ksl_vec3f_t *vo)
void ksl_subtract_vvf(const ksl_vec3f_t *v1i, const ksl_vec3f_t *v2i, ksl_vec3f_t *vo)
void ksl_axpy_vvf(const float scalar, const ksl_vec3f_t *v1x, ksl_vec3f_t *v2y)
void ksl_nxpy_vvf(const ksl_vec3f_t *v1x, ksl_vec3f_t *v2y)
void ksl_xpy_vvf(const ksl_vec3f_t *v1x, ksl_vec3f_t *v2y)
void ksl_cross_vvf(const ksl_vec3f_t *v1i, const ksl_vec3f_t *v2i, ksl_vec3f_t *vo)
void ksl_cross_vvinvf(const ksl_vec3f_t *v1i, const ksl_vec3f_t *v2i, ksl_vec3f_t *vo)
void ksl_add_vvxf(const ksl_vec3f_t *t1i, const float t2i, ksl_vec3f_t *to)
void ksl_add_vvxinvf(const ksl_vec3f_t *t1i, const float t2i, ksl_vec3f_t *to)
void ksl_add_vvyf(const ksl_vec3f_t *t1i, const float t2i, ksl_vec3f_t *to)
void ksl_add_vvyinvf(const ksl_vec3f_t *t1i, const float t2i, ksl_vec3f_t *to)
void ksl_add_vvzf(const ksl_vec3f_t *t1i, const float t2i, ksl_vec3f_t *to)
void ksl_add_vvzinvf(const ksl_vec3f_t *t1i, const float t2i, ksl_vec3f_t *to)

Integer

union ksl_vec3i_t
#include <vector.h>

3 dimensional integer vector

Public Members

int at[3]
struct ksl_vec3i_t::[anonymous] [anonymous]

anonymous union allows accessing vector quantities at specified index

int x
int y
int z
struct ksl_vec3i_t::[anonymous] [anonymous]

anonymous union allows accessing vector quantities by descriptive name

ksl_vec3i_t ksl_vec3i(const int x, const int y, const int z)

vec3i constructor

ksl_vec3i_t *ksl_vec3i_alloc(int)

initialize n ksl_vec3i_t vectors of integers on the heap