Project
Loading...
Searching...
No Matches
HandMadeMath.h File Reference
#include <stdint.h>
#include <math.h>

Go to the source code of this file.

Classes

union  hmm_vec2
 
union  hmm_vec3
 
union  hmm_vec4
 
union  hmm_mat4
 
union  hmm_quaternion
 

Macros

#define HANDMADE_MATH_H
 
#define HMM_INLINE   static inline
 
#define HMM_EXTERN   extern
 
#define HMM_SINF   sinf
 
#define HMM_COSF   cosf
 
#define HMM_TANF   tanf
 
#define HMM_SQRTF   sqrtf
 
#define HMM_EXPF   expf
 
#define HMM_LOGF   logf
 
#define HMM_ACOSF   acosf
 
#define HMM_ATANF   atanf
 
#define HMM_ATAN2F   atan2f
 
#define HMM_PI32   3.14159265359f
 
#define HMM_PI   3.14159265358979323846
 
#define HMM_MIN(a, b)   (a) > (b) ? (b) : (a)
 
#define HMM_MAX(a, b)   (a) < (b) ? (b) : (a)
 
#define HMM_ABS(a)   ((a) > 0 ? (a) : -(a))
 
#define HMM_MOD(a, m)   ((a) % (m)) >= 0 ? ((a) % (m)) : (((a) % (m)) + (m))
 
#define HMM_SQUARE(x)   ((x) * (x))
 

Typedefs

typedef union hmm_vec2 hmm_vec2
 
typedef union hmm_vec3 hmm_vec3
 
typedef union hmm_vec4 hmm_vec4
 
typedef union hmm_mat4 hmm_mat4
 
typedef union hmm_quaternion hmm_quaternion
 
typedef int32_t hmm_bool
 
typedef hmm_vec2 hmm_v2
 
typedef hmm_vec3 hmm_v3
 
typedef hmm_vec4 hmm_v4
 
typedef hmm_mat4 hmm_m4
 

Functions

HMM_INLINE float HMM_SinF (float Radians)
 
HMM_INLINE float HMM_CosF (float Radians)
 
HMM_INLINE float HMM_TanF (float Radians)
 
HMM_INLINE float HMM_ACosF (float Radians)
 
HMM_INLINE float HMM_ATanF (float Radians)
 
HMM_INLINE float HMM_ATan2F (float Left, float Right)
 
HMM_INLINE float HMM_ExpF (float Float)
 
HMM_INLINE float HMM_LogF (float Float)
 
HMM_INLINE float HMM_SquareRootF (float Float)
 
HMM_INLINE float HMM_RSquareRootF (float Float)
 
HMM_EXTERN float HMM_Power (float Base, int Exponent)
 
HMM_INLINE float HMM_PowerF (float Base, float Exponent)
 
HMM_INLINE float HMM_ToRadians (float Degrees)
 
HMM_INLINE float HMM_Lerp (float A, float Time, float B)
 
HMM_INLINE float HMM_Clamp (float Min, float Value, float Max)
 
HMM_INLINE hmm_vec2 HMM_Vec2 (float X, float Y)
 
HMM_INLINE hmm_vec2 HMM_Vec2i (int X, int Y)
 
HMM_INLINE hmm_vec3 HMM_Vec3 (float X, float Y, float Z)
 
HMM_INLINE hmm_vec3 HMM_Vec3i (int X, int Y, int Z)
 
HMM_INLINE hmm_vec4 HMM_Vec4 (float X, float Y, float Z, float W)
 
HMM_INLINE hmm_vec4 HMM_Vec4i (int X, int Y, int Z, int W)
 
HMM_INLINE hmm_vec4 HMM_Vec4v (hmm_vec3 Vector, float W)
 
HMM_INLINE hmm_vec2 HMM_AddVec2 (hmm_vec2 Left, hmm_vec2 Right)
 
HMM_INLINE hmm_vec3 HMM_AddVec3 (hmm_vec3 Left, hmm_vec3 Right)
 
HMM_INLINE hmm_vec4 HMM_AddVec4 (hmm_vec4 Left, hmm_vec4 Right)
 
HMM_INLINE hmm_vec2 HMM_SubtractVec2 (hmm_vec2 Left, hmm_vec2 Right)
 
HMM_INLINE hmm_vec3 HMM_SubtractVec3 (hmm_vec3 Left, hmm_vec3 Right)
 
HMM_INLINE hmm_vec4 HMM_SubtractVec4 (hmm_vec4 Left, hmm_vec4 Right)
 
HMM_INLINE hmm_vec2 HMM_MultiplyVec2 (hmm_vec2 Left, hmm_vec2 Right)
 
HMM_INLINE hmm_vec2 HMM_MultiplyVec2f (hmm_vec2 Left, float Right)
 
HMM_INLINE hmm_vec3 HMM_MultiplyVec3 (hmm_vec3 Left, hmm_vec3 Right)
 
HMM_INLINE hmm_vec3 HMM_MultiplyVec3f (hmm_vec3 Left, float Right)
 
HMM_INLINE hmm_vec4 HMM_MultiplyVec4 (hmm_vec4 Left, hmm_vec4 Right)
 
HMM_INLINE hmm_vec4 HMM_MultiplyVec4f (hmm_vec4 Left, float Right)
 
HMM_INLINE hmm_vec2 HMM_DivideVec2 (hmm_vec2 Left, hmm_vec2 Right)
 
HMM_INLINE hmm_vec2 HMM_DivideVec2f (hmm_vec2 Left, float Right)
 
HMM_INLINE hmm_vec3 HMM_DivideVec3 (hmm_vec3 Left, hmm_vec3 Right)
 
HMM_INLINE hmm_vec3 HMM_DivideVec3f (hmm_vec3 Left, float Right)
 
HMM_INLINE hmm_vec4 HMM_DivideVec4 (hmm_vec4 Left, hmm_vec4 Right)
 
HMM_INLINE hmm_vec4 HMM_DivideVec4f (hmm_vec4 Left, float Right)
 
HMM_INLINE hmm_bool HMM_EqualsVec2 (hmm_vec2 Left, hmm_vec2 Right)
 
HMM_INLINE hmm_bool HMM_EqualsVec3 (hmm_vec3 Left, hmm_vec3 Right)
 
HMM_INLINE hmm_bool HMM_EqualsVec4 (hmm_vec4 Left, hmm_vec4 Right)
 
HMM_INLINE float HMM_DotVec2 (hmm_vec2 VecOne, hmm_vec2 VecTwo)
 
HMM_INLINE float HMM_DotVec3 (hmm_vec3 VecOne, hmm_vec3 VecTwo)
 
HMM_INLINE float HMM_DotVec4 (hmm_vec4 VecOne, hmm_vec4 VecTwo)
 
HMM_INLINE hmm_vec3 HMM_Cross (hmm_vec3 VecOne, hmm_vec3 VecTwo)
 
HMM_INLINE float HMM_LengthSquaredVec2 (hmm_vec2 A)
 
HMM_INLINE float HMM_LengthSquaredVec3 (hmm_vec3 A)
 
HMM_INLINE float HMM_LengthSquaredVec4 (hmm_vec4 A)
 
HMM_INLINE float HMM_LengthVec2 (hmm_vec2 A)
 
HMM_INLINE float HMM_LengthVec3 (hmm_vec3 A)
 
HMM_INLINE float HMM_LengthVec4 (hmm_vec4 A)
 
HMM_INLINE hmm_vec2 HMM_NormalizeVec2 (hmm_vec2 A)
 
HMM_INLINE hmm_vec3 HMM_NormalizeVec3 (hmm_vec3 A)
 
HMM_INLINE hmm_vec4 HMM_NormalizeVec4 (hmm_vec4 A)
 
HMM_INLINE hmm_mat4 HMM_Mat4 ()
 
HMM_INLINE hmm_mat4 HMM_Mat4d (float Diagonal)
 
HMM_EXTERN hmm_mat4 HMM_Transpose (hmm_mat4 Matrix)
 
HMM_EXTERN hmm_mat4 HMM_AddMat4 (hmm_mat4 Left, hmm_mat4 Right)
 
HMM_EXTERN hmm_mat4 HMM_SubtractMat4 (hmm_mat4 Left, hmm_mat4 Right)
 
HMM_EXTERN hmm_mat4 HMM_MultiplyMat4 (hmm_mat4 Left, hmm_mat4 Right)
 
HMM_EXTERN hmm_mat4 HMM_MultiplyMat4f (hmm_mat4 Matrix, float Scalar)
 
HMM_EXTERN hmm_vec4 HMM_MultiplyMat4ByVec4 (hmm_mat4 Matrix, hmm_vec4 Vector)
 
HMM_EXTERN hmm_mat4 HMM_DivideMat4f (hmm_mat4 Matrix, float Scalar)
 
HMM_INLINE hmm_mat4 HMM_Orthographic (float Left, float Right, float Bottom, float Top, float Near, float Far)
 
HMM_INLINE hmm_mat4 HMM_Perspective (float FOV, float AspectRatio, float Near, float Far)
 
HMM_INLINE hmm_mat4 HMM_Translate (hmm_vec3 Translation)
 
HMM_EXTERN hmm_mat4 HMM_Rotate (float Angle, hmm_vec3 Axis)
 
HMM_INLINE hmm_mat4 HMM_Scale (hmm_vec3 Scale)
 
HMM_EXTERN hmm_mat4 HMM_LookAt (hmm_vec3 Eye, hmm_vec3 Center, hmm_vec3 Up)
 
HMM_INLINE hmm_quaternion HMM_Quaternion (float X, float Y, float Z, float W)
 
HMM_INLINE hmm_quaternion HMM_QuaternionV4 (hmm_vec4 Vector)
 
HMM_INLINE hmm_quaternion HMM_AddQuaternion (hmm_quaternion Left, hmm_quaternion Right)
 
HMM_INLINE hmm_quaternion HMM_SubtractQuaternion (hmm_quaternion Left, hmm_quaternion Right)
 
HMM_INLINE hmm_quaternion HMM_MultiplyQuaternion (hmm_quaternion Left, hmm_quaternion Right)
 
HMM_INLINE hmm_quaternion HMM_MultiplyQuaternionF (hmm_quaternion Left, float Multiplicative)
 
HMM_INLINE hmm_quaternion HMM_DivideQuaternionF (hmm_quaternion Left, float Dividend)
 
HMM_EXTERN hmm_quaternion HMM_InverseQuaternion (hmm_quaternion Left)
 
HMM_INLINE float HMM_DotQuaternion (hmm_quaternion Left, hmm_quaternion Right)
 
HMM_INLINE hmm_quaternion HMM_NormalizeQuaternion (hmm_quaternion Left)
 
HMM_INLINE hmm_quaternion HMM_NLerp (hmm_quaternion Left, float Time, hmm_quaternion Right)
 
HMM_EXTERN hmm_quaternion HMM_Slerp (hmm_quaternion Left, float Time, hmm_quaternion Right)
 
HMM_EXTERN hmm_mat4 HMM_QuaternionToMat4 (hmm_quaternion Left)
 
HMM_EXTERN hmm_quaternion HMM_QuaternionFromAxisAngle (hmm_vec3 Axis, float AngleOfRotation)
 

Macro Definition Documentation

◆ HANDMADE_MATH_H

#define HANDMADE_MATH_H

Definition at line 231 of file HandMadeMath.h.

◆ HMM_ABS

#define HMM_ABS (   a)    ((a) > 0 ? (a) : -(a))

Definition at line 296 of file HandMadeMath.h.

◆ HMM_ACOSF

#define HMM_ACOSF   acosf

Definition at line 280 of file HandMadeMath.h.

◆ HMM_ATAN2F

#define HMM_ATAN2F   atan2f

Definition at line 288 of file HandMadeMath.h.

◆ HMM_ATANF

#define HMM_ATANF   atanf

Definition at line 284 of file HandMadeMath.h.

◆ HMM_COSF

#define HMM_COSF   cosf

Definition at line 260 of file HandMadeMath.h.

◆ HMM_EXPF

#define HMM_EXPF   expf

Definition at line 272 of file HandMadeMath.h.

◆ HMM_EXTERN

#define HMM_EXTERN   extern

Definition at line 247 of file HandMadeMath.h.

◆ HMM_INLINE

#define HMM_INLINE   static inline

Definition at line 246 of file HandMadeMath.h.

◆ HMM_LOGF

#define HMM_LOGF   logf

Definition at line 276 of file HandMadeMath.h.

◆ HMM_MAX

#define HMM_MAX (   a,
  b 
)    (a) < (b) ? (b) : (a)

Definition at line 295 of file HandMadeMath.h.

◆ HMM_MIN

#define HMM_MIN (   a,
  b 
)    (a) > (b) ? (b) : (a)

Definition at line 294 of file HandMadeMath.h.

◆ HMM_MOD

#define HMM_MOD (   a,
  m 
)    ((a) % (m)) >= 0 ? ((a) % (m)) : (((a) % (m)) + (m))

Definition at line 297 of file HandMadeMath.h.

◆ HMM_PI

#define HMM_PI   3.14159265358979323846

Definition at line 292 of file HandMadeMath.h.

◆ HMM_PI32

#define HMM_PI32   3.14159265359f

Definition at line 291 of file HandMadeMath.h.

◆ HMM_SINF

#define HMM_SINF   sinf

Definition at line 256 of file HandMadeMath.h.

◆ HMM_SQRTF

#define HMM_SQRTF   sqrtf

Definition at line 268 of file HandMadeMath.h.

◆ HMM_SQUARE

#define HMM_SQUARE (   x)    ((x) * (x))

Definition at line 298 of file HandMadeMath.h.

◆ HMM_TANF

#define HMM_TANF   tanf

Definition at line 264 of file HandMadeMath.h.

Typedef Documentation

◆ hmm_bool

typedef int32_t hmm_bool

Definition at line 486 of file HandMadeMath.h.

◆ hmm_m4

typedef hmm_mat4 hmm_m4

Definition at line 491 of file HandMadeMath.h.

◆ hmm_mat4

typedef union hmm_mat4 hmm_mat4

◆ hmm_quaternion

◆ hmm_v2

typedef hmm_vec2 hmm_v2

Definition at line 488 of file HandMadeMath.h.

◆ hmm_v3

typedef hmm_vec3 hmm_v3

Definition at line 489 of file HandMadeMath.h.

◆ hmm_v4

typedef hmm_vec4 hmm_v4

Definition at line 490 of file HandMadeMath.h.

◆ hmm_vec2

typedef union hmm_vec2 hmm_vec2

◆ hmm_vec3

typedef union hmm_vec3 hmm_vec3

◆ hmm_vec4

typedef union hmm_vec4 hmm_vec4

Function Documentation

◆ HMM_ACosF()

HMM_INLINE float HMM_ACosF ( float  Radians)

Definition at line 518 of file HandMadeMath.h.

◆ HMM_AddMat4()

HMM_EXTERN hmm_mat4 HMM_AddMat4 ( hmm_mat4  Left,
hmm_mat4  Right 
)

◆ HMM_AddQuaternion()

HMM_INLINE hmm_quaternion HMM_AddQuaternion ( hmm_quaternion  Left,
hmm_quaternion  Right 
)

Definition at line 1323 of file HandMadeMath.h.

◆ HMM_AddVec2()

HMM_INLINE hmm_vec2 HMM_AddVec2 ( hmm_vec2  Left,
hmm_vec2  Right 
)

Definition at line 718 of file HandMadeMath.h.

◆ HMM_AddVec3()

HMM_INLINE hmm_vec3 HMM_AddVec3 ( hmm_vec3  Left,
hmm_vec3  Right 
)

Definition at line 728 of file HandMadeMath.h.

◆ HMM_AddVec4()

HMM_INLINE hmm_vec4 HMM_AddVec4 ( hmm_vec4  Left,
hmm_vec4  Right 
)

Definition at line 739 of file HandMadeMath.h.

◆ HMM_ATan2F()

HMM_INLINE float HMM_ATan2F ( float  Left,
float  Right 
)

Definition at line 532 of file HandMadeMath.h.

◆ HMM_ATanF()

HMM_INLINE float HMM_ATanF ( float  Radians)

Definition at line 525 of file HandMadeMath.h.

◆ HMM_Clamp()

HMM_INLINE float HMM_Clamp ( float  Min,
float  Value,
float  Max 
)

Definition at line 609 of file HandMadeMath.h.

◆ HMM_CosF()

HMM_INLINE float HMM_CosF ( float  Radians)

Definition at line 504 of file HandMadeMath.h.

◆ HMM_Cross()

HMM_INLINE hmm_vec3 HMM_Cross ( hmm_vec3  VecOne,
hmm_vec3  VecTwo 
)

Definition at line 998 of file HandMadeMath.h.

◆ HMM_DivideMat4f()

HMM_EXTERN hmm_mat4 HMM_DivideMat4f ( hmm_mat4  Matrix,
float  Scalar 
)

◆ HMM_DivideQuaternionF()

HMM_INLINE hmm_quaternion HMM_DivideQuaternionF ( hmm_quaternion  Left,
float  Dividend 
)

Definition at line 1371 of file HandMadeMath.h.

◆ HMM_DivideVec2()

HMM_INLINE hmm_vec2 HMM_DivideVec2 ( hmm_vec2  Left,
hmm_vec2  Right 
)

Definition at line 867 of file HandMadeMath.h.

◆ HMM_DivideVec2f()

HMM_INLINE hmm_vec2 HMM_DivideVec2f ( hmm_vec2  Left,
float  Right 
)

Definition at line 877 of file HandMadeMath.h.

◆ HMM_DivideVec3()

HMM_INLINE hmm_vec3 HMM_DivideVec3 ( hmm_vec3  Left,
hmm_vec3  Right 
)

Definition at line 887 of file HandMadeMath.h.

◆ HMM_DivideVec3f()

HMM_INLINE hmm_vec3 HMM_DivideVec3f ( hmm_vec3  Left,
float  Right 
)

Definition at line 898 of file HandMadeMath.h.

◆ HMM_DivideVec4()

HMM_INLINE hmm_vec4 HMM_DivideVec4 ( hmm_vec4  Left,
hmm_vec4  Right 
)

Definition at line 909 of file HandMadeMath.h.

◆ HMM_DivideVec4f()

HMM_INLINE hmm_vec4 HMM_DivideVec4f ( hmm_vec4  Left,
float  Right 
)

Definition at line 925 of file HandMadeMath.h.

◆ HMM_DotQuaternion()

HMM_INLINE float HMM_DotQuaternion ( hmm_quaternion  Left,
hmm_quaternion  Right 
)

Definition at line 1385 of file HandMadeMath.h.

◆ HMM_DotVec2()

HMM_INLINE float HMM_DotVec2 ( hmm_vec2  VecOne,
hmm_vec2  VecTwo 
)

Definition at line 963 of file HandMadeMath.h.

◆ HMM_DotVec3()

HMM_INLINE float HMM_DotVec3 ( hmm_vec3  VecOne,
hmm_vec3  VecTwo 
)

Definition at line 970 of file HandMadeMath.h.

◆ HMM_DotVec4()

HMM_INLINE float HMM_DotVec4 ( hmm_vec4  VecOne,
hmm_vec4  VecTwo 
)

Definition at line 977 of file HandMadeMath.h.

◆ HMM_EqualsVec2()

HMM_INLINE hmm_bool HMM_EqualsVec2 ( hmm_vec2  Left,
hmm_vec2  Right 
)

Definition at line 942 of file HandMadeMath.h.

◆ HMM_EqualsVec3()

HMM_INLINE hmm_bool HMM_EqualsVec3 ( hmm_vec3  Left,
hmm_vec3  Right 
)

Definition at line 949 of file HandMadeMath.h.

◆ HMM_EqualsVec4()

HMM_INLINE hmm_bool HMM_EqualsVec4 ( hmm_vec4  Left,
hmm_vec4  Right 
)

Definition at line 956 of file HandMadeMath.h.

◆ HMM_ExpF()

HMM_INLINE float HMM_ExpF ( float  Float)

Definition at line 539 of file HandMadeMath.h.

◆ HMM_InverseQuaternion()

HMM_EXTERN hmm_quaternion HMM_InverseQuaternion ( hmm_quaternion  Left)

◆ HMM_LengthSquaredVec2()

HMM_INLINE float HMM_LengthSquaredVec2 ( hmm_vec2  A)

Definition at line 1013 of file HandMadeMath.h.

◆ HMM_LengthSquaredVec3()

HMM_INLINE float HMM_LengthSquaredVec3 ( hmm_vec3  A)

Definition at line 1020 of file HandMadeMath.h.

◆ HMM_LengthSquaredVec4()

HMM_INLINE float HMM_LengthSquaredVec4 ( hmm_vec4  A)

Definition at line 1027 of file HandMadeMath.h.

◆ HMM_LengthVec2()

HMM_INLINE float HMM_LengthVec2 ( hmm_vec2  A)

Definition at line 1034 of file HandMadeMath.h.

◆ HMM_LengthVec3()

HMM_INLINE float HMM_LengthVec3 ( hmm_vec3  A)

Definition at line 1041 of file HandMadeMath.h.

◆ HMM_LengthVec4()

HMM_INLINE float HMM_LengthVec4 ( hmm_vec4  A)

Definition at line 1048 of file HandMadeMath.h.

◆ HMM_Lerp()

HMM_INLINE float HMM_Lerp ( float  A,
float  Time,
float  B 
)

Definition at line 602 of file HandMadeMath.h.

◆ HMM_LogF()

HMM_INLINE float HMM_LogF ( float  Float)

Definition at line 546 of file HandMadeMath.h.

◆ HMM_LookAt()

HMM_EXTERN hmm_mat4 HMM_LookAt ( hmm_vec3  Eye,
hmm_vec3  Center,
hmm_vec3  Up 
)

◆ HMM_Mat4()

HMM_INLINE hmm_mat4 HMM_Mat4 ( )

Definition at line 1131 of file HandMadeMath.h.

◆ HMM_Mat4d()

HMM_INLINE hmm_mat4 HMM_Mat4d ( float  Diagonal)

Definition at line 1138 of file HandMadeMath.h.

◆ HMM_MultiplyMat4()

HMM_EXTERN hmm_mat4 HMM_MultiplyMat4 ( hmm_mat4  Left,
hmm_mat4  Right 
)

◆ HMM_MultiplyMat4ByVec4()

HMM_EXTERN hmm_vec4 HMM_MultiplyMat4ByVec4 ( hmm_mat4  Matrix,
hmm_vec4  Vector 
)

◆ HMM_MultiplyMat4f()

HMM_EXTERN hmm_mat4 HMM_MultiplyMat4f ( hmm_mat4  Matrix,
float  Scalar 
)

◆ HMM_MultiplyQuaternion()

HMM_INLINE hmm_quaternion HMM_MultiplyQuaternion ( hmm_quaternion  Left,
hmm_quaternion  Right 
)

Definition at line 1347 of file HandMadeMath.h.

◆ HMM_MultiplyQuaternionF()

HMM_INLINE hmm_quaternion HMM_MultiplyQuaternionF ( hmm_quaternion  Left,
float  Multiplicative 
)

Definition at line 1359 of file HandMadeMath.h.

◆ HMM_MultiplyVec2()

HMM_INLINE hmm_vec2 HMM_MultiplyVec2 ( hmm_vec2  Left,
hmm_vec2  Right 
)

Definition at line 792 of file HandMadeMath.h.

◆ HMM_MultiplyVec2f()

HMM_INLINE hmm_vec2 HMM_MultiplyVec2f ( hmm_vec2  Left,
float  Right 
)

Definition at line 802 of file HandMadeMath.h.

◆ HMM_MultiplyVec3()

HMM_INLINE hmm_vec3 HMM_MultiplyVec3 ( hmm_vec3  Left,
hmm_vec3  Right 
)

Definition at line 812 of file HandMadeMath.h.

◆ HMM_MultiplyVec3f()

HMM_INLINE hmm_vec3 HMM_MultiplyVec3f ( hmm_vec3  Left,
float  Right 
)

Definition at line 823 of file HandMadeMath.h.

◆ HMM_MultiplyVec4()

HMM_INLINE hmm_vec4 HMM_MultiplyVec4 ( hmm_vec4  Left,
hmm_vec4  Right 
)

Definition at line 834 of file HandMadeMath.h.

◆ HMM_MultiplyVec4f()

HMM_INLINE hmm_vec4 HMM_MultiplyVec4f ( hmm_vec4  Left,
float  Right 
)

Definition at line 850 of file HandMadeMath.h.

◆ HMM_NLerp()

HMM_INLINE hmm_quaternion HMM_NLerp ( hmm_quaternion  Left,
float  Time,
hmm_quaternion  Right 
)

Definition at line 1402 of file HandMadeMath.h.

◆ HMM_NormalizeQuaternion()

HMM_INLINE hmm_quaternion HMM_NormalizeQuaternion ( hmm_quaternion  Left)

Definition at line 1392 of file HandMadeMath.h.

◆ HMM_NormalizeVec2()

HMM_INLINE hmm_vec2 HMM_NormalizeVec2 ( hmm_vec2  A)

Definition at line 1055 of file HandMadeMath.h.

◆ HMM_NormalizeVec3()

HMM_INLINE hmm_vec3 HMM_NormalizeVec3 ( hmm_vec3  A)

Definition at line 1070 of file HandMadeMath.h.

◆ HMM_NormalizeVec4()

HMM_INLINE hmm_vec4 HMM_NormalizeVec4 ( hmm_vec4  A)

Definition at line 1086 of file HandMadeMath.h.

◆ HMM_Orthographic()

HMM_INLINE hmm_mat4 HMM_Orthographic ( float  Left,
float  Right,
float  Bottom,
float  Top,
float  Near,
float  Far 
)

Definition at line 1237 of file HandMadeMath.h.

◆ HMM_Perspective()

HMM_INLINE hmm_mat4 HMM_Perspective ( float  FOV,
float  AspectRatio,
float  Near,
float  Far 
)

Definition at line 1253 of file HandMadeMath.h.

◆ HMM_Power()

HMM_EXTERN float HMM_Power ( float  Base,
int  Exponent 
)

◆ HMM_PowerF()

HMM_INLINE float HMM_PowerF ( float  Base,
float  Exponent 
)

Definition at line 585 of file HandMadeMath.h.

◆ HMM_Quaternion()

HMM_INLINE hmm_quaternion HMM_Quaternion ( float  X,
float  Y,
float  Z,
float  W 
)

Definition at line 1299 of file HandMadeMath.h.

◆ HMM_QuaternionFromAxisAngle()

HMM_EXTERN hmm_quaternion HMM_QuaternionFromAxisAngle ( hmm_vec3  Axis,
float  AngleOfRotation 
)

◆ HMM_QuaternionToMat4()

HMM_EXTERN hmm_mat4 HMM_QuaternionToMat4 ( hmm_quaternion  Left)

◆ HMM_QuaternionV4()

HMM_INLINE hmm_quaternion HMM_QuaternionV4 ( hmm_vec4  Vector)

Definition at line 1311 of file HandMadeMath.h.

◆ HMM_Rotate()

HMM_EXTERN hmm_mat4 HMM_Rotate ( float  Angle,
hmm_vec3  Axis 
)

◆ HMM_RSquareRootF()

HMM_INLINE float HMM_RSquareRootF ( float  Float)

Definition at line 568 of file HandMadeMath.h.

◆ HMM_Scale()

HMM_INLINE hmm_mat4 HMM_Scale ( hmm_vec3  Scale)

Definition at line 1282 of file HandMadeMath.h.

◆ HMM_SinF()

HMM_INLINE float HMM_SinF ( float  Radians)

Definition at line 497 of file HandMadeMath.h.

◆ HMM_Slerp()

HMM_EXTERN hmm_quaternion HMM_Slerp ( hmm_quaternion  Left,
float  Time,
hmm_quaternion  Right 
)

◆ HMM_SquareRootF()

HMM_INLINE float HMM_SquareRootF ( float  Float)

Definition at line 553 of file HandMadeMath.h.

◆ HMM_SubtractMat4()

HMM_EXTERN hmm_mat4 HMM_SubtractMat4 ( hmm_mat4  Left,
hmm_mat4  Right 
)

◆ HMM_SubtractQuaternion()

HMM_INLINE hmm_quaternion HMM_SubtractQuaternion ( hmm_quaternion  Left,
hmm_quaternion  Right 
)

Definition at line 1335 of file HandMadeMath.h.

◆ HMM_SubtractVec2()

HMM_INLINE hmm_vec2 HMM_SubtractVec2 ( hmm_vec2  Left,
hmm_vec2  Right 
)

Definition at line 755 of file HandMadeMath.h.

◆ HMM_SubtractVec3()

HMM_INLINE hmm_vec3 HMM_SubtractVec3 ( hmm_vec3  Left,
hmm_vec3  Right 
)

Definition at line 765 of file HandMadeMath.h.

◆ HMM_SubtractVec4()

HMM_INLINE hmm_vec4 HMM_SubtractVec4 ( hmm_vec4  Left,
hmm_vec4  Right 
)

Definition at line 776 of file HandMadeMath.h.

◆ HMM_TanF()

HMM_INLINE float HMM_TanF ( float  Radians)

Definition at line 511 of file HandMadeMath.h.

◆ HMM_ToRadians()

HMM_INLINE float HMM_ToRadians ( float  Degrees)

Definition at line 595 of file HandMadeMath.h.

◆ HMM_Translate()

HMM_INLINE hmm_mat4 HMM_Translate ( hmm_vec3  Translation)

Definition at line 1269 of file HandMadeMath.h.

◆ HMM_Transpose()

HMM_EXTERN hmm_mat4 HMM_Transpose ( hmm_mat4  Matrix)

◆ HMM_Vec2()

HMM_INLINE hmm_vec2 HMM_Vec2 ( float  X,
float  Y 
)

Definition at line 626 of file HandMadeMath.h.

◆ HMM_Vec2i()

HMM_INLINE hmm_vec2 HMM_Vec2i ( int  X,
int  Y 
)

Definition at line 636 of file HandMadeMath.h.

◆ HMM_Vec3()

HMM_INLINE hmm_vec3 HMM_Vec3 ( float  X,
float  Y,
float  Z 
)

Definition at line 646 of file HandMadeMath.h.

◆ HMM_Vec3i()

HMM_INLINE hmm_vec3 HMM_Vec3i ( int  X,
int  Y,
int  Z 
)

Definition at line 657 of file HandMadeMath.h.

◆ HMM_Vec4()

HMM_INLINE hmm_vec4 HMM_Vec4 ( float  X,
float  Y,
float  Z,
float  W 
)

Definition at line 668 of file HandMadeMath.h.

◆ HMM_Vec4i()

HMM_INLINE hmm_vec4 HMM_Vec4i ( int  X,
int  Y,
int  Z,
int  W 
)

Definition at line 684 of file HandMadeMath.h.

◆ HMM_Vec4v()

HMM_INLINE hmm_vec4 HMM_Vec4v ( hmm_vec3  Vector,
float  W 
)

Definition at line 700 of file HandMadeMath.h.