Base IACoreV2
Some checks failed
CI / build-linux-and-wasm (x64-linux) (push) Has been cancelled

This commit is contained in:
2026-01-22 05:54:26 +05:30
parent dedf28c6cb
commit 3ad1e3a2fb
57 changed files with 4398 additions and 4639 deletions

View File

@ -20,12 +20,12 @@ using namespace IACore;
IAT_BEGIN_BLOCK(Core, FloatVec4)
BOOL TestFloatArithmetic()
bool TestFloatArithmetic()
{
FloatVec4 v1(10.0f, 20.0f, 30.0f, 40.0f);
FloatVec4 v2(2.0f, 4.0f, 5.0f, 8.0f);
ALIGN(16) FLOAT32 res[4];
alignas(16) f32 res[4];
(v1 / v2).Store(res);
IAT_CHECK_APPROX(res[0], 5.0f);
@ -40,9 +40,9 @@ BOOL TestFloatArithmetic()
return TRUE;
}
BOOL TestMathHelpers()
bool TestMathHelpers()
{
ALIGN(16) FLOAT32 res[4];
alignas(16) f32 res[4];
FloatVec4 vSq(4.0f, 9.0f, 16.0f, 25.0f);
vSq.Sqrt().Store(res);
@ -63,9 +63,9 @@ BOOL TestMathHelpers()
return TRUE;
}
BOOL TestApproxMath()
bool TestApproxMath()
{
ALIGN(16) FLOAT32 res[4];
alignas(16) f32 res[4];
FloatVec4 v(16.0f, 25.0f, 100.0f, 1.0f);
v.Rsqrt().Store(res);
@ -76,16 +76,16 @@ BOOL TestApproxMath()
return TRUE;
}
BOOL TestLinearAlgebra()
bool TestLinearAlgebra()
{
FloatVec4 v1(1.0f, 2.0f, 3.0f, 4.0f);
FloatVec4 v2(1.0f, 0.0f, 1.0f, 0.0f);
FLOAT32 dot = v1.Dot(v2);
f32 dot = v1.Dot(v2);
IAT_CHECK_APPROX(dot, 4.0f);
FloatVec4 vNorm(10.0f, 0.0f, 0.0f, 0.0f);
ALIGN(16) FLOAT32 res[4];
alignas(16) f32 res[4];
vNorm.Normalize().Store(res);
IAT_CHECK_APPROX(res[0], 1.0f);