PER Firmware
Loading...
Searching...
No Matches
linear_algebra.h File Reference

Linear algebra functions utility header. More...

#include <math.h>
Include dependency graph for linear_algebra.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vector3_t
 
struct  matrix3x3_t
 

Functions

static float vector3_magnitude (const vector3_t vec)
 Calculate the magnitude of a 3D vector.
 
static vector3_t vector3_normalize (const vector3_t vec)
 Normalize a 3D vector.
 
static vector3_t matrix_multiply_vector3 (const matrix3x3_t *mat, const vector3_t *in)
 Multiply a 3x3 matrix with a 3D vector.
 
static matrix3x3_t matrix_multiply_matrix3x3 (const matrix3x3_t *a, const matrix3x3_t *b)
 Multiply a 3x3 matrix with another 3x3 matrix.
 

Detailed Description

Linear algebra functions utility header.

Basic floating point vector and matrix types and operations.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)

Function Documentation

◆ matrix_multiply_matrix3x3()

static matrix3x3_t matrix_multiply_matrix3x3 ( const matrix3x3_t * a,
const matrix3x3_t * b )
inlinestatic

Multiply a 3x3 matrix with another 3x3 matrix.

Parameters
aThe first input matrix
bThe second input matrix
Returns
The resulting matrix AB.

◆ matrix_multiply_vector3()

static vector3_t matrix_multiply_vector3 ( const matrix3x3_t * mat,
const vector3_t * in )
inlinestatic

Multiply a 3x3 matrix with a 3D vector.

Parameters
matThe input matrix
inThe input vector
Returns
The resulting vector.
Here is the caller graph for this function:

◆ vector3_magnitude()

static float vector3_magnitude ( const vector3_t vec)
inlinestatic

Calculate the magnitude of a 3D vector.

Parameters
vecThe input vector
Returns
The magnitude of the vector.
Here is the caller graph for this function:

◆ vector3_normalize()

static vector3_t vector3_normalize ( const vector3_t vec)
inlinestatic

Normalize a 3D vector.

Parameters
vecThe input vector
Returns
The normalized vector.
Here is the call graph for this function: