diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc339c4..58ba286 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Run tests on: [push] jobs: build: @@ -12,25 +12,15 @@ jobs: uses: actions/cache@v1 with: path: ~/.choosenim - key: ${{ runner.os }}-choosenim-1.0.2 + key: ${{ runner.os }}-choosenim-stable - name: Cache nimble id: cache-nimble uses: actions/cache@v1 with: path: ~/.nimble - key: ${{ runner.os }}-nimble-1.0.2 + key: ${{ runner.os }}-nimble-stable - - name: Install Nim - if: steps.cache-choosenim.outputs.cache-hit != 'true' || steps.cache-nimble.outputs.cache-hit != 'true' - run: | - export CHOOSENIM_CHOOSE_VERSION="1.0.2" - curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh - sh init.sh -y + - uses: jiro4989/setup-nim-action@v1.0.2 - - name: Build project - run: | - export PATH=$HOME/.nimble/bin:$PATH - echo $PATH - nimble install -y - nim c src/vmath.nim + - run: nimble test -y diff --git a/src/vmath.nim b/src/vmath.nim index 0116472..805b182 100644 --- a/src/vmath.nim +++ b/src/vmath.nim @@ -1305,7 +1305,6 @@ proc quat*(m: Mat4): Quat = q = quat(m12 - m21, m20 - m02, m01 - m10, t) q = q * (0.5 / sqrt(t)) - echo abs(q.length - 1.0) assert abs(q.length - 1.0) < 0.001 q diff --git a/tests/vmathtest.nims b/tests/config.nims similarity index 100% rename from tests/vmathtest.nims rename to tests/config.nims diff --git a/tests/vmathtest.test.txt b/tests/test-output.txt similarity index 96% rename from tests/vmathtest.test.txt rename to tests/test-output.txt index 166a1d2..cd2e060 100644 --- a/tests/vmathtest.test.txt +++ b/tests/test-output.txt @@ -41,7 +41,6 @@ 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.00000000, 0.00000000, 0.00000000, 1.00000000) [1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, @@ -52,7 +51,6 @@ q(0.00000000, 0.00000000, 0.00000000, 1.00000000) 0.00000, 0.00000, -1.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.70710677, 0.00000000, 0.00000000, 0.70710677) [1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, -1.00000, 0.00000, @@ -63,7 +61,6 @@ q(0.70710677, 0.00000000, 0.00000000, 0.70710677) 0.00000, 1.00000, 0.00000, 0.00000, -1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.00000000, 0.70710671, 0.00000000, 0.70710677) [0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, @@ -74,7 +71,6 @@ q(0.00000000, 0.70710671, 0.00000000, 0.70710677) 0.00000, 1.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.00000000, -0.70710671, 0.00000000, 0.70710677) [0.00000, 0.00000, -1.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, @@ -85,7 +81,6 @@ q(0.00000000, -0.70710671, 0.00000000, 0.70710677) 0.00000, 0.00000, -1.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.70710671, 0.00000000, 0.00000000, 0.70710677) [1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, -1.00000, 0.00000, @@ -97,7 +92,6 @@ true 0.00000, 0.00000, -1.00000, 0.00000, 0.00000, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.70710671, 0.00000000, 0.00000000, 0.70710677) [1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, -1.00000, 0.00000, @@ -109,7 +103,6 @@ true 0.45139, -0.29392, 0.84253, 0.00000, 0.84253, 0.45139, -0.29392, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(0.56875318, 0.56875318, 0.56875318, -0.17192911) [-0.29392, 0.84253, 0.45139, 0.00000, 0.45139, -0.29392, 0.84253, 0.00000, @@ -120,7 +113,6 @@ q(0.56875318, 0.56875318, 0.56875318, -0.17192911) -0.84253, -0.29392, 0.45139, 0.00000, -0.45139, 0.84253, -0.29392, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(-0.56875318, 0.56875318, 0.56875318, -0.17192911) [-0.29392, -0.45139, -0.84253, 0.00000, -0.84253, -0.29392, 0.45139, 0.00000, @@ -131,7 +123,6 @@ q(-0.56875318, 0.56875318, 0.56875318, -0.17192911) -0.52440, -0.84648, 0.09208, 0.00000, -0.84236, 0.53152, 0.08898, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.63899082, 0.21725684, 0.71758670, -0.17192909) [-0.12426, -0.03090, -0.99177, 0.00000, -0.52440, -0.84648, 0.09208, 0.00000, @@ -142,7 +133,6 @@ q(-0.63899082, 0.21725684, 0.71758670, -0.17192909) 0.00000, 1.00000, -0.00003, 0.00000, 0.00001, 0.00003, 1.00000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.00001343, -0.00000529, 0.00000046, 1.00000000) [1.00000, -0.00000, -0.00001, 0.00000, 0.00000, 1.00000, -0.00003, 0.00000, @@ -152,7 +142,6 @@ q(0.00001343, -0.00000529, 0.00000046, 1.00000000) 0.22420, 0.96867, -0.10682, 0.00000, -0.03408, 0.11733, 0.99251, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.05649684, 0.02354353, 0.11167806, 0.99185777) [0.97395, -0.21888, 0.05932, 0.00000, 0.22420, 0.96867, -0.10682, 0.00000, @@ -162,7 +151,6 @@ q(0.05649684, 0.02354353, 0.11167806, 0.99185777) 0.12656, 0.98260, 0.13592, 0.00000, 0.29630, -0.16821, 0.94016, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.07730617, -0.15473069, 0.05217682, 0.98354453) [0.94667, -0.07871, -0.31244, 0.00000, 0.12656, 0.98260, 0.13592, 0.00000, @@ -172,7 +160,6 @@ q(-0.07730617, -0.15473069, 0.05217682, 0.98354453) 0.00248, 0.99999, -0.00365, 0.00000, 0.00010, 0.00365, 0.99999, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.00182304, -0.00004744, 0.00123900, 0.99999762) [1.00000, -0.00248, -0.00009, 0.00000, 0.00248, 0.99999, -0.00365, 0.00000, @@ -182,7 +169,6 @@ q(0.00182304, -0.00004744, 0.00123900, 0.99999762) 0.77105, 0.43564, 0.46444, 0.00000, 0.54951, -0.82374, -0.13960, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(0.50638878, 0.55979633, -0.16046251, -0.63596427) [0.32176, 0.36285, -0.87453, 0.00000, 0.77105, 0.43564, 0.46444, 0.00000, @@ -192,7 +178,6 @@ q(0.50638878, 0.55979633, -0.16046251, -0.63596427) 0.99084, 0.11647, -0.06840, 0.00000, -0.08507, 0.93147, 0.35374, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.39834076, 0.40552813, 0.53206140, 0.62752080) [0.10492, -0.34468, 0.93284, 0.00000, 0.99084, 0.11647, -0.06840, 0.00000, @@ -202,7 +187,6 @@ q(0.39834076, 0.40552813, 0.53206140, 0.62752080) -0.77476, -0.14184, -0.61614, 0.00000, -0.17773, -0.88636, 0.42753, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.16397245, -0.50926191, 0.73758608, -0.41198561) [-0.60676, 0.44074, 0.66150, 0.00000, -0.77476, -0.14184, -0.61614, 0.00000, @@ -212,7 +196,6 @@ q(0.16397245, -0.50926191, 0.73758608, -0.41198561) -0.11510, 0.98697, 0.11242, 0.00000, -0.06155, -0.12004, 0.99086, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.05833903, 0.03416020, -0.05577203, 0.99615216) [0.99145, 0.10713, 0.07456, 0.00000, -0.11510, 0.98697, 0.11242, 0.00000, @@ -222,7 +205,6 @@ q(-0.05833903, 0.03416020, -0.05577203, 0.99615216) 0.39134, -0.36704, 0.84388, 0.00000, -0.28179, 0.82517, 0.48958, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(-0.01884186, 0.50483084, 0.82653940, 0.24824029) [-0.87604, -0.42938, 0.21949, 0.00000, 0.39134, -0.36704, 0.84388, 0.00000, @@ -232,7 +214,6 @@ q(-0.01884186, 0.50483084, 0.82653940, 0.24824029) -0.61101, 0.52767, 0.59011, 0.00000, 0.19462, -0.62243, 0.75809, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.34697443, 0.02375118, -0.34025231, 0.87365496) [0.76733, 0.57804, 0.27762, 0.00000, -0.61101, 0.52767, 0.59011, 0.00000, @@ -242,7 +223,6 @@ q(-0.34697443, 0.02375118, -0.34025231, 0.87365496) -0.17635, 0.88202, 0.43697, 0.00000, -0.06650, -0.45359, 0.88873, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(-0.22985375, 0.05294601, -0.07846884, 0.96861064) [0.98208, 0.12767, 0.13864, 0.00000, -0.17635, 0.88202, 0.43697, 0.00000, @@ -252,7 +232,6 @@ q(-0.22985375, 0.05294601, -0.07846884, 0.96861064) -0.51618, -0.40423, -0.75509, 0.00000, 0.76332, 0.18274, -0.61964, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.77658421, -0.45468298, 0.31469420, 0.30190730) [0.38846, -0.89622, 0.21423, 0.00000, -0.51618, -0.40423, -0.75509, 0.00000, @@ -262,7 +241,6 @@ q(0.77658421, -0.45468298, 0.31469420, 0.30190730) 0.83840, 0.52063, -0.16136, 0.00000, 0.15543, 0.05539, 0.98629, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.06226622, -0.05455938, 0.48560250, 0.87025076) [0.52243, -0.85199, -0.03449, 0.00000, 0.83840, 0.52063, -0.16136, 0.00000, @@ -272,7 +250,6 @@ q(0.06226622, -0.05455938, 0.48560250, 0.87025076) 0.09844, 0.98729, -0.12479, 0.00000, -0.08554, 0.13333, 0.98737, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.06480295, 0.04597623, 0.04643992, 0.99575609) [0.99146, -0.08653, 0.09758, 0.00000, 0.09844, 0.98729, -0.12479, 0.00000, @@ -282,7 +259,6 @@ q(0.06480295, 0.04597623, 0.04643992, 0.99575609) 0.41523, 0.09760, 0.90447, 0.00000, 0.09676, 0.98385, -0.15058, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.19263151, 0.73360991, 0.64350235, 0.10302607) [-0.90456, 0.15004, 0.39908, 0.00000, 0.41523, 0.09760, 0.90447, 0.00000, @@ -292,7 +268,6 @@ q(0.19263151, 0.73360991, 0.64350235, 0.10302607) 0.36561, 0.52649, 0.76756, 0.00000, 0.36644, -0.83947, 0.40127, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.48162299, -0.25962329, 0.06924627, 0.83417022) [0.85560, 0.13455, -0.49984, 0.00000, 0.36561, 0.52649, 0.76756, 0.00000, @@ -302,7 +277,6 @@ q(-0.48162299, -0.25962329, 0.06924627, 0.83417022) -0.98590, -0.04401, 0.16145, 0.00000, -0.07804, -0.73255, -0.67623, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.68342477, -0.60913497, 0.23438646, -0.32702926) [0.14804, -0.67929, 0.71878, 0.00000, -0.98590, -0.04401, 0.16145, 0.00000, @@ -312,7 +286,6 @@ q(0.68342477, -0.60913497, 0.23438646, -0.32702926) 0.71679, -0.15514, 0.67981, 0.00000, 0.35998, -0.75264, -0.55131, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.75888610, 0.44693285, -0.04073568, -0.47189364) [0.59718, 0.63990, -0.48364, 0.00000, 0.71679, -0.15514, 0.67981, 0.00000, @@ -322,7 +295,6 @@ q(0.75888610, 0.44693285, -0.04073568, -0.47189364) 0.05456, -0.96955, 0.23874, 0.00000, 0.27130, 0.24450, 0.93092, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.13935429, 0.12295861, 0.98252487, 0.01032401) [-0.96095, 0.01398, 0.27638, 0.00000, 0.05456, -0.96955, 0.23874, 0.00000, @@ -332,7 +304,6 @@ q(0.13935429, 0.12295861, 0.98252487, 0.01032401) 0.05930, 0.99789, 0.02653, 0.00000, 0.03283, -0.02852, 0.99905, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.01377173, -0.01683329, 0.02943581, 0.99933004) [0.99770, -0.05837, -0.03445, 0.00000, 0.05930, 0.99789, 0.02653, 0.00000, @@ -342,7 +313,6 @@ q(-0.01377173, -0.01683329, 0.02943581, 0.99933004) 0.60555, -0.51720, -0.60482, 0.00000, 0.68841, 0.72173, 0.07207, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(0.67903930, 0.05358480, 0.54544222, 0.48839259) [0.39924, -0.46001, 0.79309, 0.00000, 0.60555, -0.51720, -0.60482, 0.00000, @@ -352,7 +322,6 @@ q(0.67903930, 0.05358480, 0.54544222, 0.48839259) 0.82956, -0.55242, 0.08166, 0.00000, 0.54149, 0.76001, -0.35940, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.71559489, 0.40942052, 0.51393986, 0.23699097) [0.13648, 0.34236, 0.92960, 0.00000, 0.82956, -0.55242, 0.08166, 0.00000, @@ -362,7 +331,6 @@ q(0.71559489, 0.40942052, 0.51393986, 0.23699097) -0.47522, 0.49169, 0.72966, 0.00000, 0.15494, 0.86309, -0.48069, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.17527284, 0.84239161, 0.47268909, -0.19031772) [-0.86612, -0.11537, -0.48634, 0.00000, -0.47522, 0.49169, 0.72966, 0.00000, @@ -372,7 +340,6 @@ q(-0.17527284, 0.84239161, 0.47268909, -0.19031772) -0.41191, 0.88534, 0.21564, 0.00000, -0.65739, -0.45260, 0.60249, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.18919335, 0.40368640, -0.14674722, 0.88301104) [0.63101, 0.10641, 0.76845, 0.00000, -0.41191, 0.88534, 0.21564, 0.00000, @@ -382,7 +349,6 @@ q(-0.18919335, 0.40368640, -0.14674722, 0.88301104) -0.78163, 0.11089, 0.61381, 0.00000, 0.62367, 0.12304, 0.77195, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.17835338, -0.28673568, -0.64245224, 0.68791562) [0.01008, 0.98619, -0.16533, 0.00000, -0.78163, 0.11089, 0.61381, 0.00000, @@ -392,7 +358,6 @@ q(-0.17835338, -0.28673568, -0.64245224, 0.68791562) 0.70369, -0.68380, 0.19295, 0.00000, -0.26197, -0.50215, -0.82415, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.88999915, 0.34637350, -0.22316624, -0.19525307) [0.66044, 0.52940, -0.53250, 0.00000, 0.70369, -0.68380, 0.19295, 0.00000, @@ -402,7 +367,6 @@ q(0.88999915, 0.34637350, -0.22316624, -0.19525307) -0.71868, -0.23176, 0.65558, 0.00000, 0.52385, -0.80045, 0.29130, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(-0.59112227, 0.07016319, -0.51619256, 0.61578977) [0.45724, 0.55278, 0.69668, 0.00000, -0.71868, -0.23176, 0.65558, 0.00000, @@ -412,7 +376,6 @@ q(-0.59112227, 0.07016319, -0.51619256, 0.61578977) -0.56255, 0.74935, 0.34930, 0.00000, 0.45549, -0.07168, 0.88735, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(-0.11540466, -0.20737976, -0.33467454, 0.91195846) [0.68997, 0.65828, -0.30100, 0.00000, -0.56255, 0.74935, 0.34930, 0.00000, @@ -422,7 +385,6 @@ q(-0.11540466, -0.20737976, -0.33467454, 0.91195846) 0.60095, 0.45541, -0.65686, 0.00000, 0.40392, 0.53612, 0.74123, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.35109845, -0.07819372, 0.38603899, 0.84946424) [0.68972, -0.71076, 0.13823, 0.00000, 0.60095, 0.45541, -0.65686, 0.00000, @@ -432,7 +394,6 @@ q(0.35109845, -0.07819372, 0.38603899, 0.84946424) -0.16826, 0.55275, 0.81619, 0.00000, 0.19730, -0.79235, 0.57728, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(-0.45710310, -0.04917407, -0.12117746, 0.87974685) [0.96580, 0.25817, 0.02426, 0.00000, -0.16826, 0.55275, 0.81619, 0.00000, @@ -442,7 +403,6 @@ q(-0.45710310, -0.04917407, -0.12117746, 0.87974685) 0.17296, -0.92295, -0.34386, 0.00000, -0.86494, 0.02467, -0.50128, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.85078859, 0.16369632, -0.48747876, 0.10828992) [0.47114, 0.38412, -0.79403, 0.00000, 0.17296, -0.92295, -0.34386, 0.00000, @@ -452,7 +412,6 @@ q(0.85078859, 0.16369632, -0.48747876, 0.10828992) 0.46974, 0.48710, 0.73626, 0.00000, 0.56278, -0.80779, 0.17537, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.50440311, -0.39735585, 0.04500394, 0.76528460) [0.68017, 0.33197, -0.65358, 0.00000, 0.46974, 0.48710, 0.73626, 0.00000, @@ -462,7 +421,6 @@ q(-0.50440311, -0.39735585, 0.04500394, 0.76528460) -0.30644, -0.41209, 0.85806, 0.00000, 0.48048, -0.84513, -0.23429, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.78551066, 0.01083405, 0.29835981, -0.54206729) [0.82173, 0.34048, 0.45698, 0.00000, -0.30644, -0.41209, 0.85806, 0.00000, @@ -472,7 +430,6 @@ q(0.78551066, 0.01083405, 0.29835981, -0.54206729) -0.10451, 0.99437, 0.01750, 0.00000, -0.06032, -0.02390, 0.99789, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(-0.01036874, 0.03075673, -0.05203391, 0.99811769) [0.99269, 0.10323, 0.06248, 0.00000, -0.10451, 0.99437, 0.01750, 0.00000, @@ -482,7 +439,6 @@ q(-0.01036874, 0.03075673, -0.05203391, 0.99811769) -0.38443, 0.91617, -0.11333, 0.00000, -0.92225, -0.37573, 0.09097, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.09168385, 0.66791552, -0.18305425, 0.71552366) [0.04076, 0.13949, 0.98938, 0.00000, -0.38443, 0.91617, -0.11333, 0.00000, @@ -492,7 +448,6 @@ q(-0.09168385, 0.66791552, -0.18305425, 0.71552366) 0.64160, -0.75826, 0.11571, 0.00000, 0.31275, 0.39635, 0.86319, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.22061765, 0.14047730, 0.91129565, 0.31801611) [-0.70039, -0.51763, 0.49144, 0.00000, 0.64160, -0.75826, 0.11571, 0.00000, @@ -502,7 +457,6 @@ q(0.22061765, 0.14047730, 0.91129565, 0.31801611) 0.70293, -0.44085, 0.55816, 0.00000, 0.56395, 0.82365, -0.05968, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.51650250, 0.51289678, 0.67353475, 0.12850328) [-0.43342, 0.35672, 0.82758, 0.00000, 0.70293, -0.44085, 0.55816, 0.00000, @@ -512,7 +466,6 @@ q(0.51650250, 0.51289678, 0.67353475, 0.12850328) -0.03357, 0.95759, 0.28617, 0.00000, 0.28833, -0.26488, 0.92017, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.14069842, -0.14184536, -0.03752568, 0.97911990) [0.95694, 0.11340, -0.26721, 0.00000, -0.03357, 0.95759, 0.28617, 0.00000, @@ -522,7 +475,6 @@ q(-0.14069842, -0.14184536, -0.03752568, 0.97911990) -0.20739, 0.86271, -0.46123, 0.00000, 0.33576, 0.50561, 0.79475, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.25562668, -0.19308443, -0.05746438, 0.94555342) [0.91883, 0.00996, -0.39452, 0.00000, -0.20739, 0.86271, -0.46123, 0.00000, @@ -532,7 +484,6 @@ q(0.25562668, -0.19308443, -0.05746438, 0.94555342) 0.83979, 0.36465, -0.40223, 0.00000, -0.53815, 0.65707, -0.52788, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.55566227, 0.67467165, 0.09442838, 0.47659305) [0.07180, 0.65977, 0.74803, 0.00000, 0.83979, 0.36465, -0.40223, 0.00000, @@ -542,7 +493,6 @@ q(0.55566227, 0.67467165, 0.09442838, 0.47659305) 0.16746, 0.98152, -0.09261, 0.00000, -0.43597, 0.15797, 0.88599, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.06468361, 0.22983082, 0.07110307, 0.96847212) [0.88424, -0.10799, 0.45437, 0.00000, 0.16746, 0.98152, -0.09261, 0.00000, @@ -552,7 +502,6 @@ q(0.06468361, 0.22983082, 0.07110307, 0.96847212) 0.19846, 0.94678, -0.25343, 0.00000, -0.28313, 0.30293, 0.90998, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(0.14279549, 0.15690050, 0.07887369, 0.97404867) [0.93832, -0.10884, 0.32818, 0.00000, 0.19846, 0.94678, -0.25343, 0.00000, @@ -562,7 +511,6 @@ q(0.14279549, 0.15690050, 0.07887369, 0.97404867) 0.00139, 0.99878, -0.04946, 0.00000, -0.02442, 0.04948, 0.99848, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.02474281, 0.01222670, 0.00039065, 0.99961895) [0.99970, -0.00018, 0.02446, 0.00000, 0.00139, 0.99878, -0.04946, 0.00000, @@ -572,7 +520,6 @@ q(0.02474281, 0.01222670, 0.00039065, 0.99961895) 0.66022, -0.69448, -0.28601, 0.00000, 0.68811, 0.40668, 0.60092, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.44512418, 0.03744400, 0.80567110, 0.38904569) [-0.30102, -0.59355, 0.74638, 0.00000, 0.66022, -0.69448, -0.28601, 0.00000, @@ -582,7 +529,6 @@ q(0.44512418, 0.03744400, 0.80567110, 0.38904569) 0.43753, 0.48059, -0.76001, 0.00000, -0.88131, 0.39697, -0.25634, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.48843083, 0.62418407, -0.14540546, 0.59218812) [0.17850, 0.78196, 0.59723, 0.00000, 0.43753, 0.48059, -0.76001, 0.00000, @@ -592,7 +538,6 @@ q(0.48843083, 0.62418407, -0.14540546, 0.59218812) -0.98226, 0.10264, -0.15695, 0.00000, -0.18387, -0.36266, 0.91360, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.07178406, 0.19505545, -0.66597968, 0.71642965) [0.03685, 0.92625, 0.37510, 0.00000, -0.98226, 0.10264, -0.15695, 0.00000, @@ -602,7 +547,6 @@ q(-0.07178406, 0.19505545, -0.66597968, 0.71642965) 0.12632, 0.26538, -0.95583, 0.00000, 0.53146, 0.79550, 0.29110, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.56593466, -0.18484178, 0.21685570, 0.77364403) [0.83761, -0.54475, -0.04055, 0.00000, 0.12632, 0.26538, -0.95583, 0.00000, @@ -612,7 +556,6 @@ q(0.56593466, -0.18484178, 0.21685570, 0.77364403) -0.81495, 0.27627, 0.50944, 0.00000, 0.38846, -0.39192, 0.83396, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(-0.28276458, -0.05533335, -0.53095096, 0.79691494) [0.43006, 0.87754, 0.21208, 0.00000, -0.81495, 0.27627, 0.50944, 0.00000, @@ -622,7 +565,6 @@ q(-0.28276458, -0.05533335, -0.53095096, 0.79691494) -0.16290, -0.89853, -0.40756, 0.00000, 0.85180, 0.08038, -0.51767, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.85353690, -0.17409784, 0.46982917, 0.14291708) [0.49790, -0.43149, 0.75227, 0.00000, -0.16290, -0.89853, -0.40756, 0.00000, @@ -632,7 +574,6 @@ q(0.85353690, -0.17409784, 0.46982917, 0.14291708) 0.21763, 0.93252, -0.28817, 0.00000, 0.13562, 0.26349, 0.95508, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.14050016, -0.05214720, 0.11831976, 0.98160112) [0.96656, -0.24694, -0.06913, 0.00000, 0.21763, 0.93252, -0.28817, 0.00000, @@ -642,7 +583,6 @@ q(0.14050016, -0.05214720, 0.11831976, 0.98160112) -0.06121, -0.00100, 0.99812, 0.00000, -0.93220, 0.35746, -0.05681, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.41865101, 0.59425157, 0.57029128, 0.38257596) [-0.35673, -0.93393, -0.02281, 0.00000, -0.06121, -0.00100, 0.99812, 0.00000, @@ -652,7 +592,6 @@ q(-0.41865101, 0.59425157, 0.57029128, 0.38257596) 0.46437, 0.88262, -0.07307, 0.00000, 0.39720, -0.28130, -0.87356, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.22325027, 0.94177395, -0.09407052, -0.23317777) [-0.79157, 0.37663, -0.48120, 0.00000, 0.46437, 0.88262, -0.07307, 0.00000, @@ -662,7 +601,6 @@ q(0.22325027, 0.94177395, -0.09407052, -0.23317777) 0.80692, -0.56400, -0.17545, 0.00000, 0.06597, 0.38124, -0.92212, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.87651014, 0.43907708, 0.11717352, 0.15878169) [0.58696, 0.73250, 0.34484, 0.00000, 0.80692, -0.56400, -0.17545, 0.00000, @@ -672,7 +610,6 @@ q(0.87651014, 0.43907708, 0.11717352, 0.15878169) -0.03685, 0.99885, 0.03069, 0.00000, 0.10619, -0.02662, 0.99399, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(-0.01435086, -0.05290667, -0.01921598, 0.99831134) [0.99366, 0.03989, -0.10508, 0.00000, -0.03685, 0.99885, 0.03069, 0.00000, @@ -682,7 +619,6 @@ q(-0.01435086, -0.05290667, -0.01921598, 0.99831134) 0.50391, -0.86098, 0.06921, 0.00000, -0.39934, -0.16117, 0.90253, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(-0.21940246, -0.02447371, 0.93933558, 0.26251179) [-0.76590, -0.48243, -0.42503, 0.00000, 0.50391, -0.86098, 0.06921, 0.00000, @@ -692,7 +628,6 @@ q(-0.21940246, -0.02447371, 0.93933558, 0.26251179) 0.57342, 0.65816, -0.48786, 0.00000, 0.29467, 0.38994, 0.87242, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.24178869, -0.07299490, 0.33534470, 0.90760881) [0.76443, -0.64402, 0.02966, 0.00000, 0.57342, 0.65816, -0.48786, 0.00000, @@ -702,7 +637,6 @@ q(0.24178869, -0.07299490, 0.33534470, 0.90760881) 0.10143, 0.99456, -0.02362, 0.00000, -0.80303, 0.09587, 0.58817, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.03355663, 0.45253381, 0.03991234, 0.89022142) [0.58724, -0.04069, 0.80839, 0.00000, 0.10143, 0.99456, -0.02362, 0.00000, @@ -712,7 +646,6 @@ q(0.03355663, 0.45253381, 0.03991234, 0.89022142) 0.31034, 0.47635, 0.82267, 0.00000, 0.48412, -0.82396, 0.29447, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.51168895, -0.30156037, 0.00107313, 0.80450892) [0.81812, 0.30688, -0.48631, 0.00000, 0.31034, 0.47635, 0.82267, 0.00000, @@ -722,7 +655,6 @@ q(-0.51168895, -0.30156037, 0.00107313, 0.80450892) 0.09800, 0.97162, -0.21529, 0.00000, 0.05810, 0.21038, 0.97589, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(0.10721210, -0.02366120, 0.05191907, 0.99259776) [0.99349, -0.10814, -0.03584, 0.00000, 0.09800, 0.97162, -0.21529, 0.00000, @@ -732,7 +664,6 @@ q(0.10721210, -0.02366120, 0.05191907, 0.99259776) 0.03822, -0.41437, 0.90930, 0.00000, 0.99782, 0.06484, -0.01239, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.58586085, 0.40368420, 0.60328585, -0.36035025) [-0.05383, 0.90779, 0.41595, 0.00000, 0.03822, -0.41437, 0.90930, 0.00000, @@ -742,7 +673,6 @@ q(0.58586085, 0.40368420, 0.60328585, -0.36035025) 0.63964, 0.76728, 0.04636, 0.00000, -0.56165, 0.42533, 0.70968, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.10936649, 0.36496523, 0.32311100, 0.86627859) [0.52480, -0.47998, 0.70300, 0.00000, 0.63964, 0.76728, 0.04636, 0.00000, @@ -752,7 +682,6 @@ q(0.10936649, 0.36496523, 0.32311100, 0.86627859) -0.09534, 0.97909, 0.17968, 0.00000, 0.97941, 0.06000, 0.19278, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.03903852, -0.63410169, -0.09449502, 0.76646054) [0.17797, 0.19436, -0.96465, 0.00000, -0.09534, 0.97909, 0.17968, 0.00000, @@ -762,7 +691,6 @@ q(-0.03903852, -0.63410169, -0.09449502, 0.76646054) -0.48848, 0.59630, 0.63703, 0.00000, 0.57046, -0.33420, 0.75026, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.28005207, -0.21550162, -0.35131127, 0.86701232) [0.66028, 0.72989, -0.17691, 0.00000, -0.48848, 0.59630, 0.63703, 0.00000, @@ -772,7 +700,6 @@ q(-0.28005207, -0.21550162, -0.35131127, 0.86701232) 0.10614, 0.46881, -0.87690, 0.00000, 0.24523, 0.84230, 0.48000, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.50369245, -0.07933722, 0.10902732, 0.85329515) [0.96364, -0.26599, -0.02556, 0.00000, 0.10614, 0.46881, -0.87690, 0.00000, @@ -782,7 +709,6 @@ q(0.50369245, -0.07933722, 0.10902732, 0.85329515) 0.57077, -0.09613, -0.81546, 0.00000, -0.17839, 0.95489, -0.23742, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.73058909, 0.29146054, 0.11959133, 0.60579556) [0.80150, 0.28098, 0.52788, 0.00000, 0.57077, -0.09613, -0.81546, 0.00000, @@ -792,7 +718,6 @@ q(0.73058909, 0.29146054, 0.11959133, 0.60579556) -0.27697, 0.93092, 0.23805, 0.00000, 0.02105, -0.24180, 0.97010, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(-0.12209239, 0.00669971, -0.14011085, 0.98255658) [0.96065, 0.27370, 0.04738, 0.00000, -0.27697, 0.93092, 0.23805, 0.00000, @@ -802,7 +727,6 @@ q(-0.12209239, 0.00669971, -0.14011085, 0.98255658) -0.71064, -0.27316, 0.64836, 0.00000, -0.36835, 0.92961, -0.01208, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.41406831, 0.57843572, 0.68200094, -0.16980669) [-0.59943, -0.24741, -0.76123, 0.00000, -0.71064, -0.27316, 0.64836, 0.00000, @@ -812,7 +736,6 @@ q(-0.41406831, 0.57843572, 0.68200094, -0.16980669) 0.22141, 0.64366, -0.73258, 0.00000, -0.55611, 0.70044, 0.44735, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(0.42132452, 0.31433791, -0.02556053, 0.85030824) [0.80108, 0.30835, 0.51303, 0.00000, 0.22141, 0.64366, -0.73258, 0.00000, @@ -822,7 +745,6 @@ q(0.42132452, 0.31433791, -0.02556053, 0.85030824) 0.58846, -0.79266, -0.15942, 0.00000, 0.59415, 0.55767, -0.57964, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(0.85449642, 0.24424680, 0.40763196, 0.20979841) [0.54836, 0.24637, 0.79913, 0.00000, 0.58846, -0.79266, -0.15942, 0.00000, @@ -832,7 +754,6 @@ q(0.85449642, 0.24424680, 0.40763196, 0.20979841) 0.21110, -0.97671, 0.03843, 0.00000, 0.97715, 0.21186, 0.01706, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.69549477, 0.08808376, 0.71038139, 0.06234292) [-0.02480, 0.03395, 0.99912, 0.00000, 0.21110, -0.97671, 0.03843, 0.00000, @@ -842,7 +763,6 @@ q(0.69549477, 0.08808376, 0.71038139, 0.06234292) -0.52149, 0.00191, 0.85325, 0.00000, 0.77899, -0.40697, 0.47702, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.46616358, -0.21019663, -0.53078848, 0.67584956) [0.34816, 0.91344, 0.21075, 0.00000, -0.52149, 0.00191, 0.85325, 0.00000, @@ -852,7 +772,6 @@ q(-0.46616358, -0.21019663, -0.53078848, 0.67584956) 0.59655, 0.77409, 0.21192, 0.00000, -0.28792, 0.45289, -0.84380, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.28308913, 0.91747409, 0.18115196, 0.21280490) [-0.74915, 0.44235, 0.49305, 0.00000, 0.59655, 0.77409, 0.21192, 0.00000, @@ -862,7 +781,6 @@ q(0.28308913, 0.91747409, 0.18115196, 0.21280490) -0.16038, 0.39208, 0.90584, 0.00000, -0.06610, 0.91140, -0.40618, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(-0.08554069, 0.83413094, 0.54465115, -0.01623123) [-0.98484, -0.12502, -0.12026, 0.00000, -0.16038, 0.39208, 0.90584, 0.00000, @@ -872,7 +790,6 @@ q(-0.08554069, 0.83413094, 0.54465115, -0.01623123) -0.61554, -0.59471, 0.51714, 0.00000, -0.46642, -0.25403, -0.84730, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.87710935, -0.39284909, -0.16743849, -0.21980277) [0.63527, -0.76275, -0.12103, 0.00000, -0.61554, -0.59471, 0.51714, 0.00000, @@ -882,7 +799,6 @@ q(0.87710935, -0.39284909, -0.16743849, -0.21980277) 0.88698, 0.25069, 0.38784, 0.00000, 0.17636, 0.59230, -0.78618, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.52647084, 0.78480536, 0.31222209, 0.09708924) [-0.42680, 0.76573, 0.48114, 0.00000, 0.88698, 0.25069, 0.38784, 0.00000, @@ -892,7 +808,6 @@ q(0.52647084, 0.78480536, 0.31222209, 0.09708924) 0.84588, 0.26763, -0.46137, 0.00000, -0.30344, -0.46992, -0.82892, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.52977055, 0.79611599, -0.29244864, -0.00403502) [-0.43865, 0.84116, -0.31629, 0.00000, 0.84588, 0.26763, -0.46137, 0.00000, @@ -902,7 +817,6 @@ q(0.52977055, 0.79611599, -0.29244864, -0.00403502) 0.43933, -0.23577, -0.86684, 0.00000, -0.85599, 0.18288, -0.48357, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(0.70566976, 0.49377745, -0.34628648, 0.37188703) [0.27254, 0.95445, -0.12147, 0.00000, 0.43933, -0.23577, -0.86684, 0.00000, @@ -912,7 +826,6 @@ q(0.70566976, 0.49377745, -0.34628648, 0.37188703) -0.08457, 0.82689, 0.55598, 0.00000, 0.48193, -0.45443, 0.74916, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.27206343, -0.22672045, -0.11197562, 0.92846149) [0.87212, 0.33129, -0.36007, 0.00000, -0.08457, 0.82689, 0.55598, 0.00000, @@ -922,7 +835,6 @@ q(-0.27206343, -0.22672045, -0.11197562, 0.92846149) -0.42070, -0.89018, 0.17491, 0.00000, -0.25723, -0.06785, -0.96397, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.96489829, -0.22573029, -0.11857944, -0.06289791) [0.86997, -0.45053, -0.20044, 0.00000, -0.42070, -0.89018, 0.17491, 0.00000, @@ -932,7 +844,6 @@ q(0.96489829, -0.22573029, -0.11857944, -0.06289791) -0.34059, -0.27820, 0.89811, 0.00000, 0.87829, -0.43507, 0.19831, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.59486568, -0.21675034, -0.53407180, 0.56028700) [0.33557, 0.85634, 0.39252, 0.00000, -0.34059, -0.27820, 0.89811, 0.00000, @@ -942,7 +853,6 @@ q(-0.59486568, -0.21675034, -0.53407180, 0.56028700) -0.25681, 0.93177, -0.25663, 0.00000, -0.94002, -0.17913, 0.29030, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.02477232, 0.59517753, -0.18303882, 0.78207844) [0.22452, 0.31579, 0.92188, 0.00000, -0.25681, 0.93177, -0.25663, 0.00000, @@ -952,7 +862,6 @@ q(0.02477232, 0.59517753, -0.18303882, 0.78207844) 0.59517, 0.51703, 0.61518, 0.00000, 0.54044, 0.30903, -0.78258, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(0.40951881, 0.85063720, 0.27162424, -0.18689792) [-0.59473, 0.79824, -0.09549, 0.00000, 0.59517, 0.51703, 0.61518, 0.00000, @@ -962,7 +871,6 @@ q(0.40951881, 0.85063720, 0.27162424, -0.18689792) 0.10907, 0.99395, 0.01270, 0.00000, -0.27536, 0.01793, 0.96117, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.00132331, 0.13932329, 0.05497207, 0.98871905) [0.95513, -0.10834, 0.27565, 0.00000, 0.10907, 0.99395, 0.01270, 0.00000, @@ -972,7 +880,6 @@ q(0.00132331, 0.13932329, 0.05497207, 0.98871905) -0.05237, 0.67298, 0.73780, 0.00000, 0.80374, -0.41008, 0.43110, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(-0.34949958, -0.40286580, -0.20337182, 0.82109016) [0.59268, 0.61558, -0.51942, 0.00000, -0.05237, 0.67298, 0.73780, 0.00000, @@ -982,7 +889,6 @@ q(-0.34949958, -0.40286580, -0.20337182, 0.82109016) -0.91611, 0.34028, 0.21201, 0.00000, 0.27734, 0.15598, 0.94803, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.01744772, -0.16025776, -0.57406783, 0.80278224) [0.28953, 0.92730, -0.23727, 0.00000, -0.91611, 0.34028, 0.21201, 0.00000, @@ -992,7 +898,6 @@ q(-0.01744772, -0.16025776, -0.57406783, 0.80278224) 0.08221, 0.99161, 0.09978, 0.00000, -0.53548, -0.04049, 0.84357, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(-0.03658033, 0.27726230, 0.05346029, 0.95860803) [0.84054, -0.12278, 0.52766, 0.00000, 0.08221, 0.99161, 0.09978, 0.00000, @@ -1002,7 +907,6 @@ q(-0.03658033, 0.27726230, 0.05346029, 0.95860803) -0.27955, 0.44711, 0.84968, 0.00000, 0.69720, -0.51392, 0.49981, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(-0.42226014, -0.26794082, -0.31327802, 0.80731708) [0.66013, 0.73211, -0.16806, 0.00000, -0.27955, 0.44711, 0.84968, 0.00000, @@ -1012,7 +916,6 @@ q(-0.42226014, -0.26794082, -0.31327802, 0.80731708) -0.97286, -0.20079, -0.11503, 0.00000, -0.20714, 0.53399, 0.81972, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.26358324, 0.14374615, 0.72864306, -0.61558121) [-0.10317, 0.82130, -0.56109, 0.00000, -0.97286, -0.20079, -0.11503, 0.00000, @@ -1022,7 +925,6 @@ q(-0.26358324, 0.14374615, 0.72864306, -0.61558121) -0.09777, 0.99509, 0.01556, 0.00000, -0.01914, -0.01751, 0.99966, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.00827966, 0.00998507, -0.04886289, 0.99872130) [0.99503, 0.09744, 0.02075, 0.00000, -0.09777, 0.99509, 0.01556, 0.00000, @@ -1032,7 +934,6 @@ q(-0.00827966, 0.00998507, -0.04886289, 0.99872130) -0.50693, 0.85929, 0.06808, 0.00000, 0.56124, 0.26909, 0.78269, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.05535709, -0.32495019, -0.25940236, 0.90777391) [0.65424, 0.43498, -0.61868, 0.00000, -0.50693, 0.85929, 0.06808, 0.00000, @@ -1042,7 +943,6 @@ q(0.05535709, -0.32495019, -0.25940236, 0.90777391) 0.62861, 0.70175, 0.33525, 0.00000, -0.17361, 0.54682, -0.81905, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(0.29967248, 0.90538603, 0.24356183, 0.17649405) [-0.75809, 0.45666, 0.46557, 0.00000, 0.62861, 0.70175, 0.33525, 0.00000, @@ -1052,7 +952,6 @@ q(0.29967248, 0.90538603, 0.24356183, 0.17649405) -0.54050, 0.71756, 0.43928, 0.00000, 0.82891, 0.54360, 0.13194, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.03994098, -0.65759784, -0.37366563, 0.65295011) [-0.14412, 0.43544, -0.88861, 0.00000, -0.54050, 0.71756, 0.43928, 0.00000, @@ -1062,7 +961,6 @@ q(0.03994098, -0.65759784, -0.37366563, 0.65295011) -0.65908, 0.73921, 0.13848, 0.00000, 0.20621, 0.00055, 0.97851, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.03717959, -0.09676723, -0.35918251, 0.92749214) [0.72325, 0.67347, -0.15279, 0.00000, -0.65908, 0.73921, 0.13848, 0.00000, @@ -1072,7 +970,6 @@ q(-0.03717959, -0.09676723, -0.35918251, 0.92749214) 0.58405, 0.47750, 0.65641, 0.00000, 0.78398, -0.12223, -0.60863, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.47977704, 0.75771421, 0.17624755, -0.40573388) [-0.21039, 0.87009, -0.44574, 0.00000, 0.58405, 0.47750, 0.65641, 0.00000, @@ -1082,7 +979,6 @@ q(0.47977704, 0.75771421, 0.17624755, -0.40573388) 0.58354, -0.14500, 0.79903, 0.00000, 0.81064, 0.16254, -0.56253, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.64405173, 0.60535949, 0.39710954, -0.24706522) [-0.04831, 0.97599, 0.21239, 0.00000, 0.58354, -0.14500, 0.79903, 0.00000, @@ -1092,7 +988,6 @@ q(0.64405173, 0.60535949, 0.39710954, -0.24706522) -0.68087, -0.47725, -0.55556, 0.00000, -0.50839, -0.23807, 0.82757, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.17497791, -0.23579675, 0.84143168, -0.45362473) [-0.52721, 0.84591, -0.08054, 0.00000, -0.68087, -0.47725, -0.55556, 0.00000, @@ -1102,7 +997,6 @@ q(-0.17497791, -0.23579675, 0.84143168, -0.45362473) -0.29263, 0.15589, 0.94343, 0.00000, 0.86554, -0.37619, 0.33063, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -1.192092895507813e-007 q(-0.47956556, -0.32357344, -0.43826151, 0.68792742) [0.40645, 0.91333, -0.02484, 0.00000, -0.29263, 0.15589, 0.94343, 0.00000, @@ -1112,7 +1006,6 @@ q(-0.47956556, -0.32357344, -0.43826151, 0.68792742) -0.03575, 0.91191, 0.40884, 0.00000, 0.60170, -0.30700, 0.73737, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -5.960464477539063e-008 q(-0.19277409, -0.30684772, -0.08297171, 0.92833090) [0.79792, 0.27235, -0.53772, 0.00000, -0.03575, 0.91191, 0.40884, 0.00000, @@ -1122,7 +1015,6 @@ q(-0.19277409, -0.30684772, -0.08297171, 0.92833090) -0.72331, 0.57319, 0.38506, 0.00000, 0.59053, 0.80249, -0.08530, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(-0.19634607, 0.70999873, 0.41815314, -0.53150541) [-0.35790, 0.16569, -0.91894, 0.00000, -0.72331, 0.57319, 0.38506, 0.00000, @@ -1132,7 +1024,6 @@ q(-0.19634607, 0.70999873, 0.41815314, -0.53150541) 0.51437, 0.83382, -0.20042, 0.00000, -0.23134, 0.35996, 0.90383, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.14842853, 0.16140796, 0.24710263, 0.94385207) [0.82578, -0.41854, 0.37804, 0.00000, 0.51437, 0.83382, -0.20042, 0.00000, @@ -1142,7 +1033,6 @@ q(0.14842853, 0.16140796, 0.24710263, 0.94385207) 0.81800, -0.57095, 0.06999, 0.00000, 0.06685, -0.02649, -0.99741, 0.00000, 0.00000, 0.00000, 0.00000, 1.00000] -0.0 q(0.88595670, 0.46237046, 0.02352080, -0.02722242) [0.57132, 0.82056, 0.01650, 0.00000, 0.81800, -0.57095, 0.06999, 0.00000, diff --git a/tests/test.nim b/tests/test.nim new file mode 100644 index 0000000..9026420 --- /dev/null +++ b/tests/test.nim @@ -0,0 +1,229 @@ +import vmath, osproc, random, streams + +var s = newFileStream("tests/test-output.txt", fmWrite) + +randomize(1234) + +block: + s.writeLine "# angle stuff" + s.writeLine angleBetween(0.1, 0.2), " should be: ", 0.1 + + s.writeLine angleBetween(0.1, 0.2 + PI*2), " should be: ", 0.1 + s.writeLine angleBetween(0.1, 0.2 - PI*2), " should be: ", 0.1 + s.writeLine angleBetween(0.1 + PI*2, 0.2), " should be: ", 0.1 + s.writeLine angleBetween(0.1 - PI*2, 0.2), " should be: ", 0.1 + + s.writeLine angleBetween(0.2, 0.1), " should be: ", -0.1 + + s.writeLine angleBetween(0.2, 0.1 - PI*2), " should be: ", -0.1 + s.writeLine angleBetween(0.2, 0.1 + PI*2), " should be: ", -0.1 + s.writeLine angleBetween(0.2 + PI*2, 0.1), " should be: ", -0.1 + s.writeLine angleBetween(0.2 - PI*2, 0.1), " should be: ", -0.1 + +block: + s.writeLine "# basic vector vec2" + var a = vec2(1, 2) + var b = vec2(7, 6) + var n = 13.7 + s.writeLine a + b + s.writeLine a - b + s.writeLine a * n + s.writeLine a / n + a += b + s.writeLine a + a -= b + s.writeLine a + a *= n + s.writeLine a + a /= n + s.writeLine a + +block: + s.writeLine "# basic vector vec3" + var a = vec3(1, 2, 3) + var b = vec3(7, 6, 5) + var n = 13.7 + s.writeLine a + b + s.writeLine a - b + s.writeLine a * n + s.writeLine a / n + a += b + s.writeLine a + a -= b + s.writeLine a + a *= n + s.writeLine a + a /= n + s.writeLine a + +block: + s.writeLine "# basic vector vec4" + var a = vec4(1, 2, 3, 4) + var b = vec4(7, 6, 5, 4) + var n = 13.7 + s.writeLine a + b + s.writeLine a - b + s.writeLine a * n + s.writeLine a / n + a += b + s.writeLine a + a -= b + s.writeLine a + a *= n + s.writeLine a + a /= n + s.writeLine a + +block: + s.writeLine "# basic vector mat4" + var m1 = mat4( + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + assert m1.close(m2) + +block: + s.writeLine "# basic vector mat4 -1" + var m1 = mat4( + 1, 0, 0, 0, + 0, 0, -1, 0, + 0, 1, 0, 0, + 0, 0, 0, 1) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + assert m1.close(m2) + +block: + s.writeLine "# Y 90" + var m1 = rotate(PI/2, vec3(0, 1, 0)) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + assert m1.close(m2) + +block: + s.writeLine "# -Y 90" + var m1 = rotate(PI/2, vec3(0, -1, 0)) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + assert m1.close(m2) + +block: + s.writeLine "# X 90" + var m1 = rotate(PI/2, vec3(1, 0, 0)) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + s.writeLine m1.close(m2) + +block: + s.writeLine "# Y 90" + var m1 = rotate(PI/2, vec3(1, 0, 0)) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + s.writeLine m1.close(m2) + +block: + s.writeLine "# 1,1,1 1.11rad" + var m1 = rotate(PI*1.11, vec3(1, 1, 1).normalize()) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + assert m1.close(m2) + +block: + s.writeLine "# 1,1,1 1.11rad" + var m1 = rotate(PI*1.11, vec3(-1, 1, 1).normalize()) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + assert m1.close(m2) + +block: + s.writeLine "# 1,1,1 1.11rad" + var m1 = rotate(PI*1.11, vec3(-1, 0.34, 1.123).normalize()) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + assert m1.close(m2) + +block: + s.writeLine "# super random" + for i in 0..100: + var m1 = rotate( + PI*rand(2.0), + vec3(rand(2.0)-0.5, rand(2.0)-0.5, rand(2.0)-0.5).normalize() + ) + s.writeLine m1 + var q1 = m1.quat() + s.writeLine q1 + var m2 = q1.mat4() + s.writeLine m2 + assert m1.close(m2) + +block: + s.writeLine "# matrix to quat test" + # TODO: Fix this test + # var m1 = mat4( + # -0.33089, -0.51266, -0.79227, 0.00000, + # 0, -1.0, 0, 0.00000, + # 0, 0, 1.0, 0.00000, + # 0.00000, 0.00000, 0.00000, 1.00000) + # s.writeLine m1 + # var q1 = m1.quat() + # s.writeLine q1 + # var m2 = q1.mat4() + # s.writeLine m2 + # assert m1.close(m2) + +block: + s.writeLine "# matrix to quat test" + # TODO: Fix this test + # var m1 = mat4( + # -0.33089, -0.51266, -0.79227, 0.00000, + # -0.44681, 0.82460, -0.34697, 0.00000, + # -0.83119, -0.23918, 0.50191, 0.00000, + # 0.00000, 0.00000, 0.00000, 1.00000) + + # s.writeLine vec3( -0.33089, -0.51266, -0.79227).length + # s.writeLine vec3( -0.44681, 0.82460, -0.34697).length + # s.writeLine vec3( -0.83119, -0.23918, 0.50191).length + + # s.writeLine m1 + # var q1 = m1.quat().normalize() + # s.writeLine q1 + # var m2 = q1.mat4() + # s.writeLine m2 + # assert m1.close(m2) + +s.close() + +let (outp, _) = execCmdEx("git diff tests/test-output.txt") +if len(outp) != 0: + echo outp + quit("Output does not match") diff --git a/tests/vmathtest.nim b/tests/vmathtest.nim deleted file mode 100644 index 1c979d8..0000000 --- a/tests/vmathtest.nim +++ /dev/null @@ -1,222 +0,0 @@ -# nim c -r --verbosity:0 tests\vmathtest > tests\vmathtest.test.txt; dos2unix tests\vmathtest.test.txt; git diff tests\vmathtest.test.txt - -include ../src/vmath - -randomize(1234) - -block: - echo "# angle stuff" - echo angleBetween(0.1, 0.2), " should be: ", 0.1 - - echo angleBetween(0.1, 0.2 + PI*2), " should be: ", 0.1 - echo angleBetween(0.1, 0.2 - PI*2), " should be: ", 0.1 - echo angleBetween(0.1 + PI*2, 0.2), " should be: ", 0.1 - echo angleBetween(0.1 - PI*2, 0.2), " should be: ", 0.1 - - echo angleBetween(0.2, 0.1), " should be: ", -0.1 - - echo angleBetween(0.2, 0.1 - PI*2), " should be: ", -0.1 - echo angleBetween(0.2, 0.1 + PI*2), " should be: ", -0.1 - echo angleBetween(0.2 + PI*2, 0.1), " should be: ", -0.1 - echo angleBetween(0.2 - PI*2, 0.1), " should be: ", -0.1 - -block: - echo "# basic vector vec2" - var a = vec2(1, 2) - var b = vec2(7, 6) - var n = 13.7 - echo a + b - echo a - b - echo a * n - echo a / n - a += b - echo a - a -= b - echo a - a *= n - echo a - a /= n - echo a - -block: - echo "# basic vector vec3" - var a = vec3(1, 2, 3) - var b = vec3(7, 6, 5) - var n = 13.7 - echo a + b - echo a - b - echo a * n - echo a / n - a += b - echo a - a -= b - echo a - a *= n - echo a - a /= n - echo a - -block: - echo "# basic vector vec4" - var a = vec4(1, 2, 3, 4) - var b = vec4(7, 6, 5, 4) - var n = 13.7 - echo a + b - echo a - b - echo a * n - echo a / n - a += b - echo a - a -= b - echo a - a *= n - echo a - a /= n - echo a - -block: - echo "# basic vector mat4" - var m1 = mat4( - 1, 0, 0, 0, - 0, 1, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - assert m1.close(m2) - -block: - echo "# basic vector mat4 -1" - var m1 = mat4( - 1, 0, 0, 0, - 0, 0, -1, 0, - 0, 1, 0, 0, - 0, 0, 0, 1) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - assert m1.close(m2) - -block: - echo "# Y 90" - var m1 = rotate(PI/2, vec3(0, 1, 0)) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - assert m1.close(m2) - -block: - echo "# -Y 90" - var m1 = rotate(PI/2, vec3(0, -1, 0)) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - assert m1.close(m2) - -block: - echo "# X 90" - var m1 = rotate(PI/2, vec3(1, 0, 0)) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - echo m1.close(m2) - -block: - echo "# Y 90" - var m1 = rotate(PI/2, vec3(1, 0, 0)) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - echo m1.close(m2) - -block: - echo "# 1,1,1 1.11rad" - var m1 = rotate(PI*1.11, vec3(1, 1, 1).normalize()) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - assert m1.close(m2) - -block: - echo "# 1,1,1 1.11rad" - var m1 = rotate(PI*1.11, vec3(-1, 1, 1).normalize()) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - assert m1.close(m2) - -block: - echo "# 1,1,1 1.11rad" - var m1 = rotate(PI*1.11, vec3(-1, 0.34, 1.123).normalize()) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - assert m1.close(m2) - -block: - echo "# super random" - for i in 0..100: - var m1 = rotate( - PI*rand(2.0), - vec3(rand(2.0)-0.5, rand(2.0)-0.5, rand(2.0)-0.5).normalize() - ) - echo m1 - var q1 = m1.quat() - echo q1 - var m2 = q1.mat4() - echo m2 - assert m1.close(m2) - -block: - echo "# matrix to quat test" - # TODO: Fix this test - # var m1 = mat4( - # -0.33089, -0.51266, -0.79227, 0.00000, - # 0, -1.0, 0, 0.00000, - # 0, 0, 1.0, 0.00000, - # 0.00000, 0.00000, 0.00000, 1.00000) - # echo m1 - # var q1 = m1.quat() - # echo q1 - # var m2 = q1.mat4() - # echo m2 - # assert m1.close(m2) - -block: - echo "# matrix to quat test" - # TODO: Fix this test - # var m1 = mat4( - # -0.33089, -0.51266, -0.79227, 0.00000, - # -0.44681, 0.82460, -0.34697, 0.00000, - # -0.83119, -0.23918, 0.50191, 0.00000, - # 0.00000, 0.00000, 0.00000, 1.00000) - - # echo vec3( -0.33089, -0.51266, -0.79227).length - # echo vec3( -0.44681, 0.82460, -0.34697).length - # echo vec3( -0.83119, -0.23918, 0.50191).length - - # echo m1 - # var q1 = m1.quat().normalize() - # echo q1 - # var m2 = q1.mat4() - # echo m2 - # assert m1.close(m2) diff --git a/vmath.nimble b/vmath.nimble index a8e8f62..df5fc5e 100644 --- a/vmath.nimble +++ b/vmath.nimble @@ -4,6 +4,7 @@ version = "0.3.0" author = "treeform" description = "Math vector library for graphical things." license = "MIT" + srcDir = "src" # Dependencies