Ylva And Malin
Data Structures | Macros | Functions
ym_math.h File Reference
#include <math.h>
Include dependency graph for ym_math.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ym_vec2
 
struct  ym_vec3
 
struct  ym_vec4
 
struct  ym_mat3
 
struct  ym_mat4
 

Macros

#define YM_PI   3.14159265358979323846f
 
#define YM_DEG_TO_RAD(deg)   (deg * YM_PI / 180.0f)
 
#define YM_RAD_TO_DEG(rad)   (180.0f * rad / YM_PI)
 

Functions

YM_INLINE ym_mat4 ym_mul_mat4_mat4 (ym_mat4 lhs, ym_mat4 rhs)
 
YM_INLINE ym_mat3 ym_mul_mat3_mat3 (ym_mat3 lhs, ym_mat3 rhs)
 
YM_INLINE ym_vec4 ym_mul_mat4_vec4 (ym_mat4 lhs, ym_vec4 rhs)
 
YM_INLINE ym_vec3 ym_mul_mat3_vec3 (ym_mat3 lhs, ym_vec3 rhs)
 
YM_INLINE ym_mat3 ym_translate_vec3 (ym_vec3 vec)
 
YM_INLINE ym_mat3 ym_scale_vec3 (ym_vec3 vec)
 
YM_INLINE ym_mat4 ym_translate_vec4 (ym_vec4 vec)
 
YM_INLINE ym_mat4 ym_scale_vec4 (ym_vec4 vec)
 
YM_INLINE ym_mat4 ym_lookat (ym_vec4 camera_pos, ym_vec4 target_pos, ym_vec4 up_direction)
 
YM_INLINE ym_mat4 ym_project (float near, float far, float fov, float aspect)
 
YM_INLINE void ym_print_mat3 (ym_mat3 mat)
 

Macro Definition Documentation

#define YM_DEG_TO_RAD (   deg)    (deg * YM_PI / 180.0f)
#define YM_PI   3.14159265358979323846f
#define YM_RAD_TO_DEG (   rad)    (180.0f * rad / YM_PI)

Function Documentation

YM_INLINE ym_mat4 ym_lookat ( ym_vec4  camera_pos,
ym_vec4  target_pos,
ym_vec4  up_direction 
)

Here is the call graph for this function:

Here is the caller graph for this function:

YM_INLINE ym_mat3 ym_mul_mat3_mat3 ( ym_mat3  lhs,
ym_mat3  rhs 
)
YM_INLINE ym_vec3 ym_mul_mat3_vec3 ( ym_mat3  lhs,
ym_vec3  rhs 
)
YM_INLINE ym_mat4 ym_mul_mat4_mat4 ( ym_mat4  lhs,
ym_mat4  rhs 
)

Here is the caller graph for this function:

YM_INLINE ym_vec4 ym_mul_mat4_vec4 ( ym_mat4  lhs,
ym_vec4  rhs 
)
YM_INLINE void ym_print_mat3 ( ym_mat3  mat)
YM_INLINE ym_mat4 ym_project ( float  near,
float  far,
float  fov,
float  aspect 
)

Here is the caller graph for this function:

YM_INLINE ym_mat3 ym_scale_vec3 ( ym_vec3  vec)
YM_INLINE ym_mat4 ym_scale_vec4 ( ym_vec4  vec)
YM_INLINE ym_mat3 ym_translate_vec3 ( ym_vec3  vec)
YM_INLINE ym_mat4 ym_translate_vec4 ( ym_vec4  vec)

Here is the caller graph for this function: