mirror of
https://github.com/HandmadeMath/HandmadeMath.git
synced 2025-09-08 19:28:17 +00:00
Prefixed all functions
This commit is contained in:
578
HandmadeMath.h
578
HandmadeMath.h
File diff suppressed because it is too large
Load Diff
13
main.c
13
main.c
@@ -4,8 +4,15 @@
|
|||||||
int
|
int
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
v2 VecOne = Vec2(1.0f, 1.0f);
|
hmm_mat4 MatrixOne = HMM_Mat4d(1.0f);
|
||||||
v2 VecTwo = Vec2(3.0f, 3.0f);
|
hmm_mat4 MatrixTwo = HMM_Mat4d(4.0f);
|
||||||
|
|
||||||
v2 Result = AddVec2(VecOne, VecTwo);
|
hmm_mat4 MatrixResult = HMM_MultiplyMat4(MatrixOne, MatrixTwo);
|
||||||
|
|
||||||
|
hmm_v2 VecOne = HMM_Vec2(1.0f, 1.0f);
|
||||||
|
hmm_v2 VecTwo = HMM_Vec2(3.0f, 3.0f);
|
||||||
|
|
||||||
|
hmm_v2 Result = HMM_AddVec2(VecOne, VecTwo);
|
||||||
|
|
||||||
|
return(0);
|
||||||
}
|
}
|
||||||
|
26
main.cpp
Normal file
26
main.cpp
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#define HANDMADE_MATH_IMPLEMENTATION
|
||||||
|
#define HANDMADE_MATH_CPP_MODE
|
||||||
|
#include "HandmadeMath.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
main(void)
|
||||||
|
{
|
||||||
|
hmm_mat4 MatrixOne = HMM_Mat4d(1.0f);
|
||||||
|
hmm_mat4 MatrixTwo = HMM_Mat4d(4.0f);
|
||||||
|
|
||||||
|
hmm_mat4 ResultMatrix = MatrixOne * MatrixTwo;
|
||||||
|
|
||||||
|
hmm_mat4 OrthographicMatrix = HMM_Orthographic(-1.0f, 1.0f, -1.0f, 1.0f, 0.0f, 1.0f);
|
||||||
|
hmm_mat4 PrespectiveMatrix = HMM_Perspective(45.0f, 16/9, 0.0f, 100.0f);
|
||||||
|
|
||||||
|
hmm_mat4 TranslationMatrix = HMM_Translate(HMM_Vec3(1.0f, 0.0f, 0.0f));
|
||||||
|
hmm_mat4 RotationMatrix = HMM_Rotate(45.0f, HMM_Vec3(1, 0, 0));
|
||||||
|
|
||||||
|
hmm_mat4 LookAtMatrix = HMM_LookAt(HMM_Vec3(0, 1, 0), HMM_Vec3(0, 0, 0), HMM_Vec3(1, 0, 0));
|
||||||
|
|
||||||
|
hmm_mat4 ScaleMatrix = HMM_Scale(HMM_Vec3(1.0f, 0.0f, 0.0f));
|
||||||
|
|
||||||
|
float SquareRootResult = HMM_SquareRoot(36);
|
||||||
|
|
||||||
|
return(0);
|
||||||
|
}
|
Reference in New Issue
Block a user