MCPcopy Index your code
hub / github.com/HandmadeMath/HandmadeMath / TEST

Function TEST

test/categories/QuaternionOps.h:3–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "../HandmadeTest.h"
2
3TEST(QuaternionOps, Inverse)
4{
5 HMM_Quat q1 = HMM_Q(1.0f, 2.0f, 3.0f, 4.0f);
6 HMM_Quat inverse = HMM_InvQ(q1);
7
8 HMM_Quat result = HMM_MulQ(q1, inverse);
9
10 EXPECT_FLOAT_EQ(result.X, 0.0f);
11 EXPECT_FLOAT_EQ(result.Y, 0.0f);
12 EXPECT_FLOAT_EQ(result.Z, 0.0f);
13 EXPECT_FLOAT_EQ(result.W, 1.0f);
14}
15
16TEST(QuaternionOps, Dot)
17{

Callers

nothing calls this directly

Calls 15

HMM_QFunction · 0.85
HMM_InvQFunction · 0.85
HMM_MulQFunction · 0.85
HMM_DotQFunction · 0.85
HMM_DotFunction · 0.85
HMM_NormQFunction · 0.85
HMM_NormFunction · 0.85
HMM_NLerpFunction · 0.85
HMM_SLerpFunction · 0.85
HMM_QToM4Function · 0.85
HMM_Rotate_RHFunction · 0.85
HMM_V3Function · 0.85

Tested by

no test coverage detected