mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-03-04 14:39:49 +00:00
More determinism
This commit is contained in:
parent
98ee740c7a
commit
7ecb217d20
|
@ -57,9 +57,24 @@ static const float kEpsilon = 1e-6f;
|
||||||
|
|
||||||
TEST(MatrixBase, Constructors) {
|
TEST(MatrixBase, Constructors) {
|
||||||
FasTC::MatrixBase<float, 3, 4> m3f;
|
FasTC::MatrixBase<float, 3, 4> m3f;
|
||||||
|
for(int j = 0; j < 3; j++)
|
||||||
|
for(int i = 0; i < 4; i++)
|
||||||
|
m3f[j*4+i] = static_cast<float>(i) / static_cast<float>(j+1);
|
||||||
|
|
||||||
FasTC::MatrixBase<double, 1, 1> m1d;
|
FasTC::MatrixBase<double, 1, 1> m1d;
|
||||||
|
for(int j = 0; j < 1; j++)
|
||||||
|
for(int i = 0; i < 1; i++)
|
||||||
|
m1d[j*1+i] = 0.0;
|
||||||
|
|
||||||
FasTC::MatrixBase<int, 7, 200> m7i;
|
FasTC::MatrixBase<int, 7, 200> m7i;
|
||||||
|
for(int j = 0; j < 7; j++)
|
||||||
|
for(int i = 0; i < 200; i++)
|
||||||
|
m7i[j*200+i] = i*j;
|
||||||
|
|
||||||
FasTC::MatrixBase<unsigned, 16, 16> m16u;
|
FasTC::MatrixBase<unsigned, 16, 16> m16u;
|
||||||
|
for(int j = 0; j < 16; j++)
|
||||||
|
for(int i = 0; i < 16; i++)
|
||||||
|
m16u[j*16+i] = j-i;
|
||||||
|
|
||||||
#define TEST_VECTOR_COPY_CONS(mat, t, n, m) \
|
#define TEST_VECTOR_COPY_CONS(mat, t, n, m) \
|
||||||
do { \
|
do { \
|
||||||
|
|
|
@ -57,9 +57,15 @@ static const float kEpsilon = 1e-6f;
|
||||||
|
|
||||||
TEST(VectorBase, Constructors) {
|
TEST(VectorBase, Constructors) {
|
||||||
FasTC::VectorBase<float, 3> v3f;
|
FasTC::VectorBase<float, 3> v3f;
|
||||||
|
v3f[0] = 1.1f; v3f[1] = 1.2f;
|
||||||
FasTC::VectorBase<double, 1> v1d;
|
FasTC::VectorBase<double, 1> v1d;
|
||||||
|
v1d[0] = 1.1;
|
||||||
FasTC::VectorBase<int, 7> v7i;
|
FasTC::VectorBase<int, 7> v7i;
|
||||||
|
for(int i = 0; i < 7; i++)
|
||||||
|
v7i[i] = -i;
|
||||||
FasTC::VectorBase<unsigned, 16> v16u;
|
FasTC::VectorBase<unsigned, 16> v16u;
|
||||||
|
for(int i = 0; i < 7; i++)
|
||||||
|
v16u[i] = i;
|
||||||
|
|
||||||
#define TEST_VECTOR_COPY_CONS(v, t, n) \
|
#define TEST_VECTOR_COPY_CONS(v, t, n) \
|
||||||
do { \
|
do { \
|
||||||
|
|
Loading…
Reference in a new issue