summaryrefslogtreecommitdiff
path: root/tests/test_math.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_math.cpp')
-rw-r--r--tests/test_math.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_math.cpp b/tests/test_math.cpp
index 26c2aa2088..d0b9fdef4b 100644
--- a/tests/test_math.cpp
+++ b/tests/test_math.cpp
@@ -30,13 +30,13 @@
#include "test_math.h"
+#include "core/io/file_access.h"
#include "core/math/basis.h"
#include "core/math/camera_matrix.h"
#include "core/math/delaunay_3d.h"
#include "core/math/geometry_2d.h"
#include "core/math/math_funcs.h"
-#include "core/math/transform.h"
-#include "core/os/file_access.h"
+#include "core/math/transform_3d.h"
#include "core/os/keyboard.h"
#include "core/os/os.h"
#include "core/string/print_string.h"
@@ -529,8 +529,8 @@ MainLoop *test() {
ERR_FAIL_COND_V_MSG(!fa, nullptr, "Could not open file: " + test);
Vector<uint8_t> buf;
- int flen = fa->get_len();
- buf.resize(fa->get_len() + 1);
+ uint64_t flen = fa->get_length();
+ buf.resize(fa->get_length() + 1);
fa->get_buffer(buf.ptrw(), flen);
buf.write[flen] = 0;
@@ -549,8 +549,8 @@ MainLoop *test() {
List<StringName> tl;
ClassDB::get_class_list(&tl);
- for (List<StringName>::Element *E = tl.front(); E; E = E->next()) {
- Vector<uint8_t> m5b = E->get().operator String().md5_buffer();
+ for (const StringName &E : tl) {
+ Vector<uint8_t> m5b = E.operator String().md5_buffer();
hashes.push_back(hashes.size());
}
@@ -599,13 +599,13 @@ MainLoop *test() {
Basis m2(v2, a2);
- Quat q = m;
- Quat q2 = m2;
+ Quaternion q = m;
+ Quaternion q2 = m2;
Basis m3 = m.inverse() * m2;
- Quat q3 = (q.inverse() * q2); //.normalized();
+ Quaternion q3 = (q.inverse() * q2); //.normalized();
- print_line(Quat(m3));
+ print_line(Quaternion(m3));
print_line(q3);
print_line("before v: " + v + " a: " + rtos(a));