summaryrefslogtreecommitdiffstats
path: root/core/math
diff options
context:
space:
mode:
Diffstat (limited to 'core/math')
-rw-r--r--core/math/a_star.compat.inc6
-rw-r--r--core/math/a_star.cpp6
-rw-r--r--core/math/a_star.h6
-rw-r--r--core/math/a_star_grid_2d.compat.inc6
-rw-r--r--core/math/a_star_grid_2d.cpp26
-rw-r--r--core/math/a_star_grid_2d.h10
-rw-r--r--core/math/aabb.cpp6
-rw-r--r--core/math/aabb.h6
-rw-r--r--core/math/audio_frame.h6
-rw-r--r--core/math/basis.cpp6
-rw-r--r--core/math/basis.h6
-rw-r--r--core/math/bvh.h6
-rw-r--r--core/math/bvh_abb.h6
-rw-r--r--core/math/bvh_tree.h6
-rw-r--r--core/math/color.cpp6
-rw-r--r--core/math/color.h6
-rw-r--r--core/math/color_names.inc6
-rw-r--r--core/math/convex_hull.cpp8
-rw-r--r--core/math/convex_hull.h6
-rw-r--r--core/math/delaunay_2d.h6
-rw-r--r--core/math/delaunay_3d.h6
-rw-r--r--core/math/disjoint_set.h6
-rw-r--r--core/math/dynamic_bvh.cpp6
-rw-r--r--core/math/dynamic_bvh.h6
-rw-r--r--core/math/expression.cpp6
-rw-r--r--core/math/expression.h6
-rw-r--r--core/math/face3.cpp6
-rw-r--r--core/math/face3.h6
-rw-r--r--core/math/geometry_2d.cpp6
-rw-r--r--core/math/geometry_2d.h6
-rw-r--r--core/math/geometry_3d.cpp6
-rw-r--r--core/math/geometry_3d.h6
-rw-r--r--core/math/math_defs.h6
-rw-r--r--core/math/math_fieldwise.cpp6
-rw-r--r--core/math/math_fieldwise.h6
-rw-r--r--core/math/math_funcs.cpp6
-rw-r--r--core/math/math_funcs.h6
-rw-r--r--core/math/plane.cpp6
-rw-r--r--core/math/plane.h6
-rw-r--r--core/math/projection.cpp316
-rw-r--r--core/math/projection.h6
-rw-r--r--core/math/quaternion.cpp6
-rw-r--r--core/math/quaternion.h6
-rw-r--r--core/math/quick_hull.cpp6
-rw-r--r--core/math/quick_hull.h6
-rw-r--r--core/math/random_number_generator.cpp6
-rw-r--r--core/math/random_number_generator.h6
-rw-r--r--core/math/random_pcg.cpp6
-rw-r--r--core/math/random_pcg.h6
-rw-r--r--core/math/rect2.cpp6
-rw-r--r--core/math/rect2.h6
-rw-r--r--core/math/rect2i.cpp6
-rw-r--r--core/math/rect2i.h6
-rw-r--r--core/math/static_raycaster.cpp6
-rw-r--r--core/math/static_raycaster.h6
-rw-r--r--core/math/transform_2d.cpp6
-rw-r--r--core/math/transform_2d.h6
-rw-r--r--core/math/transform_3d.cpp6
-rw-r--r--core/math/transform_3d.h6
-rw-r--r--core/math/transform_interpolator.cpp13
-rw-r--r--core/math/transform_interpolator.h6
-rw-r--r--core/math/triangle_mesh.cpp6
-rw-r--r--core/math/triangle_mesh.h6
-rw-r--r--core/math/triangulate.cpp6
-rw-r--r--core/math/triangulate.h6
-rw-r--r--core/math/vector2.cpp6
-rw-r--r--core/math/vector2.h6
-rw-r--r--core/math/vector2i.cpp6
-rw-r--r--core/math/vector2i.h6
-rw-r--r--core/math/vector3.cpp6
-rw-r--r--core/math/vector3.h6
-rw-r--r--core/math/vector3i.cpp6
-rw-r--r--core/math/vector3i.h6
-rw-r--r--core/math/vector4.cpp6
-rw-r--r--core/math/vector4.h6
-rw-r--r--core/math/vector4i.cpp6
-rw-r--r--core/math/vector4i.h6
77 files changed, 556 insertions, 249 deletions
diff --git a/core/math/a_star.compat.inc b/core/math/a_star.compat.inc
index 664d7ffd5e..a3f813906a 100644
--- a/core/math/a_star.compat.inc
+++ b/core/math/a_star.compat.inc
@@ -2,9 +2,11 @@
/* a_star.compat.inc */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index c85201a973..67934a7313 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -2,9 +2,11 @@
/* a_star.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/a_star.h b/core/math/a_star.h
index cbaafc1018..d322ffeebe 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -2,9 +2,11 @@
/* a_star.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/a_star_grid_2d.compat.inc b/core/math/a_star_grid_2d.compat.inc
index e7124c2477..fe5536ae40 100644
--- a/core/math/a_star_grid_2d.compat.inc
+++ b/core/math/a_star_grid_2d.compat.inc
@@ -2,9 +2,11 @@
/* a_star_grid_2d.compat.inc */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/a_star_grid_2d.cpp b/core/math/a_star_grid_2d.cpp
index 7e0e982c62..fc49a50b3e 100644
--- a/core/math/a_star_grid_2d.cpp
+++ b/core/math/a_star_grid_2d.cpp
@@ -2,9 +2,11 @@
/* a_star_grid_2d.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -188,6 +190,14 @@ bool AStarGrid2D::is_jumping_enabled() const {
return jumping_enabled;
}
+int64_t AStarGrid2D::get_max_traversals() const {
+ return max_traversals;
+}
+
+void AStarGrid2D::set_max_traversals(int64_t p_max_traversals) {
+ max_traversals = p_max_traversals;
+}
+
void AStarGrid2D::set_diagonal_mode(DiagonalMode p_diagonal_mode) {
ERR_FAIL_INDEX((int)p_diagonal_mode, (int)DIAGONAL_MODE_MAX);
diagonal_mode = p_diagonal_mode;
@@ -500,6 +510,7 @@ bool AStarGrid2D::_solve(Point *p_begin_point, Point *p_end_point, bool p_allow_
}
bool found_route = false;
+ int64_t traversal_count = 0;
LocalVector<Point *> open_list;
SortArray<Point *, SortPoints> sorter;
@@ -524,6 +535,14 @@ bool AStarGrid2D::_solve(Point *p_begin_point, Point *p_end_point, bool p_allow_
break;
}
+ // If we have a limit on traversals, increment and stop once we reach the threshold.
+ if (max_traversals > 0 && traversal_count >= max_traversals) {
+ break;
+ }
+
+ // Increment traversals for each node we process.
+ traversal_count++;
+
sorter.pop_heap(0, open_list.size(), open_list.ptr()); // Remove the current point from the open list.
open_list.remove_at(open_list.size() - 1);
p->closed_pass = pass; // Mark the point as closed.
@@ -751,6 +770,8 @@ void AStarGrid2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("update"), &AStarGrid2D::update);
ClassDB::bind_method(D_METHOD("set_jumping_enabled", "enabled"), &AStarGrid2D::set_jumping_enabled);
ClassDB::bind_method(D_METHOD("is_jumping_enabled"), &AStarGrid2D::is_jumping_enabled);
+ ClassDB::bind_method(D_METHOD("set_max_traversals", "max_traversals"), &AStarGrid2D::set_max_traversals);
+ ClassDB::bind_method(D_METHOD("get_max_traversals"), &AStarGrid2D::get_max_traversals);
ClassDB::bind_method(D_METHOD("set_diagonal_mode", "mode"), &AStarGrid2D::set_diagonal_mode);
ClassDB::bind_method(D_METHOD("get_diagonal_mode"), &AStarGrid2D::get_diagonal_mode);
ClassDB::bind_method(D_METHOD("set_default_compute_heuristic", "heuristic"), &AStarGrid2D::set_default_compute_heuristic);
@@ -780,6 +801,7 @@ void AStarGrid2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_shape", PROPERTY_HINT_ENUM, "Square,IsometricRight,IsometricDown"), "set_cell_shape", "get_cell_shape");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "jumping_enabled"), "set_jumping_enabled", "is_jumping_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "max_traversals", PROPERTY_HINT_RANGE, "0,65536,0"), "set_max_traversals", "get_max_traversals");
ADD_PROPERTY(PropertyInfo(Variant::INT, "default_compute_heuristic", PROPERTY_HINT_ENUM, "Euclidean,Manhattan,Octile,Chebyshev"), "set_default_compute_heuristic", "get_default_compute_heuristic");
ADD_PROPERTY(PropertyInfo(Variant::INT, "default_estimate_heuristic", PROPERTY_HINT_ENUM, "Euclidean,Manhattan,Octile,Chebyshev"), "set_default_estimate_heuristic", "get_default_estimate_heuristic");
ADD_PROPERTY(PropertyInfo(Variant::INT, "diagonal_mode", PROPERTY_HINT_ENUM, "Never,Always,At Least One Walkable,Only If No Obstacles"), "set_diagonal_mode", "get_diagonal_mode");
diff --git a/core/math/a_star_grid_2d.h b/core/math/a_star_grid_2d.h
index 0536b8109b..9bfbe899ee 100644
--- a/core/math/a_star_grid_2d.h
+++ b/core/math/a_star_grid_2d.h
@@ -2,9 +2,11 @@
/* a_star_grid_2d.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -71,6 +73,7 @@ private:
CellShape cell_shape = CELL_SHAPE_SQUARE;
bool jumping_enabled = false;
+ int64_t max_traversals = 0;
DiagonalMode diagonal_mode = DIAGONAL_MODE_ALWAYS;
Heuristic default_compute_heuristic = HEURISTIC_EUCLIDEAN;
Heuristic default_estimate_heuristic = HEURISTIC_EUCLIDEAN;
@@ -202,6 +205,9 @@ public:
void set_jumping_enabled(bool p_enabled);
bool is_jumping_enabled() const;
+ void set_max_traversals(int64_t p_max_traversals);
+ int64_t get_max_traversals() const;
+
void set_diagonal_mode(DiagonalMode p_diagonal_mode);
DiagonalMode get_diagonal_mode() const;
diff --git a/core/math/aabb.cpp b/core/math/aabb.cpp
index 7d1d7c5648..aeca60a177 100644
--- a/core/math/aabb.cpp
+++ b/core/math/aabb.cpp
@@ -2,9 +2,11 @@
/* aabb.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/aabb.h b/core/math/aabb.h
index 7a5581b5d4..09b471d0d0 100644
--- a/core/math/aabb.h
+++ b/core/math/aabb.h
@@ -2,9 +2,11 @@
/* aabb.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h
index e205126cdf..2d7b60ed81 100644
--- a/core/math/audio_frame.h
+++ b/core/math/audio_frame.h
@@ -2,9 +2,11 @@
/* audio_frame.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/basis.cpp b/core/math/basis.cpp
index 34ed1c2d85..fcc5f8d0e8 100644
--- a/core/math/basis.cpp
+++ b/core/math/basis.cpp
@@ -2,9 +2,11 @@
/* basis.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/basis.h b/core/math/basis.h
index 2d4994de19..814ae255b2 100644
--- a/core/math/basis.h
+++ b/core/math/basis.h
@@ -2,9 +2,11 @@
/* basis.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/bvh.h b/core/math/bvh.h
index 4815466e89..501ef3f221 100644
--- a/core/math/bvh.h
+++ b/core/math/bvh.h
@@ -2,9 +2,11 @@
/* bvh.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/bvh_abb.h b/core/math/bvh_abb.h
index 3d32c250c9..cd348081c2 100644
--- a/core/math/bvh_abb.h
+++ b/core/math/bvh_abb.h
@@ -2,9 +2,11 @@
/* bvh_abb.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/bvh_tree.h b/core/math/bvh_tree.h
index 0faa50555f..184c1ce5c4 100644
--- a/core/math/bvh_tree.h
+++ b/core/math/bvh_tree.h
@@ -2,9 +2,11 @@
/* bvh_tree.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/color.cpp b/core/math/color.cpp
index 1638acd74d..c09477d3af 100644
--- a/core/math/color.cpp
+++ b/core/math/color.cpp
@@ -2,9 +2,11 @@
/* color.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/color.h b/core/math/color.h
index 70fad78acb..51448ac40f 100644
--- a/core/math/color.h
+++ b/core/math/color.h
@@ -2,9 +2,11 @@
/* color.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/color_names.inc b/core/math/color_names.inc
index 6c0d2a4bfd..fec3037f1e 100644
--- a/core/math/color_names.inc
+++ b/core/math/color_names.inc
@@ -2,9 +2,11 @@
/* color_names.inc */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/convex_hull.cpp b/core/math/convex_hull.cpp
index 620a7541e4..3b7d83e46b 100644
--- a/core/math/convex_hull.cpp
+++ b/core/math/convex_hull.cpp
@@ -2,9 +2,11 @@
/* convex_hull.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -2326,7 +2328,7 @@ Error ConvexHullComputer::convex_hull(const Vector<Vector3> &p_points, Geometry3
e = e->get_next_edge_of_face();
} while (e != e_start);
- // reverse indices: Godot wants clockwise, but this is counter-clockwise
+ // reverse indices: Redot wants clockwise, but this is counter-clockwise
if (face.indices.size() > 2) {
// reverse all but the first index.
int *indices = face.indices.ptr();
diff --git a/core/math/convex_hull.h b/core/math/convex_hull.h
index 75787f7bb5..88462ab47e 100644
--- a/core/math/convex_hull.h
+++ b/core/math/convex_hull.h
@@ -2,9 +2,11 @@
/* convex_hull.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/delaunay_2d.h b/core/math/delaunay_2d.h
index 0bc67a92f6..4f9f829c1a 100644
--- a/core/math/delaunay_2d.h
+++ b/core/math/delaunay_2d.h
@@ -2,9 +2,11 @@
/* delaunay_2d.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/delaunay_3d.h b/core/math/delaunay_3d.h
index 4f21a665de..5c7feae873 100644
--- a/core/math/delaunay_3d.h
+++ b/core/math/delaunay_3d.h
@@ -2,9 +2,11 @@
/* delaunay_3d.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/disjoint_set.h b/core/math/disjoint_set.h
index 4348da992d..8f0416b18f 100644
--- a/core/math/disjoint_set.h
+++ b/core/math/disjoint_set.h
@@ -2,9 +2,11 @@
/* disjoint_set.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/dynamic_bvh.cpp b/core/math/dynamic_bvh.cpp
index e1315d1c64..eb0f0ce300 100644
--- a/core/math/dynamic_bvh.cpp
+++ b/core/math/dynamic_bvh.cpp
@@ -2,9 +2,11 @@
/* dynamic_bvh.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/dynamic_bvh.h b/core/math/dynamic_bvh.h
index 26fc517f7f..75ad2abcff 100644
--- a/core/math/dynamic_bvh.h
+++ b/core/math/dynamic_bvh.h
@@ -2,9 +2,11 @@
/* dynamic_bvh.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/expression.cpp b/core/math/expression.cpp
index 35303fe9ac..5eb524efed 100644
--- a/core/math/expression.cpp
+++ b/core/math/expression.cpp
@@ -2,9 +2,11 @@
/* expression.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/expression.h b/core/math/expression.h
index 46bc3618df..24af4a819c 100644
--- a/core/math/expression.h
+++ b/core/math/expression.h
@@ -2,9 +2,11 @@
/* expression.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/face3.cpp b/core/math/face3.cpp
index 1dff0ee4a6..55856d6844 100644
--- a/core/math/face3.cpp
+++ b/core/math/face3.cpp
@@ -2,9 +2,11 @@
/* face3.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/face3.h b/core/math/face3.h
index 519dcb6414..4037799d9d 100644
--- a/core/math/face3.h
+++ b/core/math/face3.h
@@ -2,9 +2,11 @@
/* face3.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/geometry_2d.cpp b/core/math/geometry_2d.cpp
index 376d5d0b43..c1b08d8cfd 100644
--- a/core/math/geometry_2d.cpp
+++ b/core/math/geometry_2d.cpp
@@ -2,9 +2,11 @@
/* geometry_2d.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/geometry_2d.h b/core/math/geometry_2d.h
index abd395d8df..929d69ffc9 100644
--- a/core/math/geometry_2d.h
+++ b/core/math/geometry_2d.h
@@ -2,9 +2,11 @@
/* geometry_2d.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/geometry_3d.cpp b/core/math/geometry_3d.cpp
index 4d55455166..860de1f8f4 100644
--- a/core/math/geometry_3d.cpp
+++ b/core/math/geometry_3d.cpp
@@ -2,9 +2,11 @@
/* geometry_3d.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/geometry_3d.h b/core/math/geometry_3d.h
index ff39d82595..76ca06efa7 100644
--- a/core/math/geometry_3d.h
+++ b/core/math/geometry_3d.h
@@ -2,9 +2,11 @@
/* geometry_3d.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/math_defs.h b/core/math/math_defs.h
index fe53121a03..d1bbbd4074 100644
--- a/core/math/math_defs.h
+++ b/core/math/math_defs.h
@@ -2,9 +2,11 @@
/* math_defs.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/math_fieldwise.cpp b/core/math/math_fieldwise.cpp
index 4064e6aaa6..e4d08a373f 100644
--- a/core/math/math_fieldwise.cpp
+++ b/core/math/math_fieldwise.cpp
@@ -2,9 +2,11 @@
/* math_fieldwise.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/math_fieldwise.h b/core/math/math_fieldwise.h
index 6d222c1578..87d1c1d7fe 100644
--- a/core/math/math_fieldwise.h
+++ b/core/math/math_fieldwise.h
@@ -2,9 +2,11 @@
/* math_fieldwise.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/math_funcs.cpp b/core/math/math_funcs.cpp
index 0d5b0faa9d..5724d62074 100644
--- a/core/math/math_funcs.cpp
+++ b/core/math/math_funcs.cpp
@@ -2,9 +2,11 @@
/* math_funcs.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index 1afc5f4bbb..84c4bbcd73 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -2,9 +2,11 @@
/* math_funcs.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/plane.cpp b/core/math/plane.cpp
index 6b9bcea081..3ae4503fe4 100644
--- a/core/math/plane.cpp
+++ b/core/math/plane.cpp
@@ -2,9 +2,11 @@
/* plane.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/plane.h b/core/math/plane.h
index 65783ff4cf..7ea55499b8 100644
--- a/core/math/plane.h
+++ b/core/math/plane.h
@@ -2,9 +2,11 @@
/* plane.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/projection.cpp b/core/math/projection.cpp
index d0ca7c5684..da28682393 100644
--- a/core/math/projection.cpp
+++ b/core/math/projection.cpp
@@ -2,9 +2,11 @@
/* projection.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -596,101 +598,229 @@ Projection Projection::inverse() const {
}
void Projection::invert() {
- int i, j, k;
- int pvt_i[4], pvt_j[4]; /* Locations of pivot matrix */
- real_t pvt_val; /* Value of current pivot element */
- real_t hold; /* Temporary storage */
- real_t determinant = 1.0f;
- for (k = 0; k < 4; k++) {
- /** Locate k'th pivot element **/
- pvt_val = columns[k][k]; /** Initialize for search **/
- pvt_i[k] = k;
- pvt_j[k] = k;
- for (i = k; i < 4; i++) {
- for (j = k; j < 4; j++) {
- if (Math::abs(columns[i][j]) > Math::abs(pvt_val)) {
- pvt_i[k] = i;
- pvt_j[k] = j;
- pvt_val = columns[i][j];
- }
- }
- }
-
- /** Product of pivots, gives determinant when finished **/
- determinant *= pvt_val;
- if (Math::is_zero_approx(determinant)) {
- return; /** Matrix is singular (zero determinant). **/
- }
-
- /** "Interchange" rows (with sign change stuff) **/
- i = pvt_i[k];
- if (i != k) { /** If rows are different **/
- for (j = 0; j < 4; j++) {
- hold = -columns[k][j];
- columns[k][j] = columns[i][j];
- columns[i][j] = hold;
- }
- }
-
- /** "Interchange" columns **/
- j = pvt_j[k];
- if (j != k) { /** If columns are different **/
- for (i = 0; i < 4; i++) {
- hold = -columns[i][k];
- columns[i][k] = columns[i][j];
- columns[i][j] = hold;
- }
- }
-
- /** Divide column by minus pivot value **/
- for (i = 0; i < 4; i++) {
- if (i != k) {
- columns[i][k] /= (-pvt_val);
- }
- }
-
- /** Reduce the matrix **/
- for (i = 0; i < 4; i++) {
- hold = columns[i][k];
- for (j = 0; j < 4; j++) {
- if (i != k && j != k) {
- columns[i][j] += hold * columns[k][j];
- }
- }
- }
-
- /** Divide row by pivot **/
- for (j = 0; j < 4; j++) {
- if (j != k) {
- columns[k][j] /= pvt_val;
- }
- }
-
- /** Replace pivot by reciprocal (at last we can touch it). **/
- columns[k][k] = 1.0 / pvt_val;
+ // Adapted from Mesa's `src/util/u_math.c` `util_invert_mat4x4`.
+ // MIT licensed. Copyright 2008 VMware, Inc. Authored by Jacques Leroy.
+ Projection temp;
+ real_t *out = (real_t *)temp.columns;
+ real_t *m = (real_t *)columns;
+
+ real_t wtmp[4][8];
+ real_t m0, m1, m2, m3, s;
+ real_t *r0, *r1, *r2, *r3;
+
+#define MAT(m, r, c) (m)[(c) * 4 + (r)]
+
+ r0 = wtmp[0];
+ r1 = wtmp[1];
+ r2 = wtmp[2];
+ r3 = wtmp[3];
+
+ r0[0] = MAT(m, 0, 0);
+ r0[1] = MAT(m, 0, 1);
+ r0[2] = MAT(m, 0, 2);
+ r0[3] = MAT(m, 0, 3);
+ r0[4] = 1.0;
+ r0[5] = 0.0;
+ r0[6] = 0.0;
+ r0[7] = 0.0;
+
+ r1[0] = MAT(m, 1, 0);
+ r1[1] = MAT(m, 1, 1);
+ r1[2] = MAT(m, 1, 2);
+ r1[3] = MAT(m, 1, 3);
+ r1[5] = 1.0;
+ r1[4] = 0.0;
+ r1[6] = 0.0;
+ r1[7] = 0.0;
+
+ r2[0] = MAT(m, 2, 0);
+ r2[1] = MAT(m, 2, 1);
+ r2[2] = MAT(m, 2, 2);
+ r2[3] = MAT(m, 2, 3);
+ r2[6] = 1.0;
+ r2[4] = 0.0;
+ r2[5] = 0.0;
+ r2[7] = 0.0;
+
+ r3[0] = MAT(m, 3, 0);
+ r3[1] = MAT(m, 3, 1);
+ r3[2] = MAT(m, 3, 2);
+ r3[3] = MAT(m, 3, 3);
+
+ r3[7] = 1.0;
+ r3[4] = 0.0;
+ r3[5] = 0.0;
+ r3[6] = 0.0;
+
+ /* choose pivot - or die */
+ if (Math::abs(r3[0]) > Math::abs(r2[0])) {
+ SWAP(r3, r2);
+ }
+ if (Math::abs(r2[0]) > Math::abs(r1[0])) {
+ SWAP(r2, r1);
+ }
+ if (Math::abs(r1[0]) > Math::abs(r0[0])) {
+ SWAP(r1, r0);
+ }
+ ERR_FAIL_COND(0.0 == r0[0]);
+
+ /* eliminate first variable */
+ m1 = r1[0] / r0[0];
+ m2 = r2[0] / r0[0];
+ m3 = r3[0] / r0[0];
+ s = r0[1];
+ r1[1] -= m1 * s;
+ r2[1] -= m2 * s;
+ r3[1] -= m3 * s;
+ s = r0[2];
+ r1[2] -= m1 * s;
+ r2[2] -= m2 * s;
+ r3[2] -= m3 * s;
+ s = r0[3];
+ r1[3] -= m1 * s;
+ r2[3] -= m2 * s;
+ r3[3] -= m3 * s;
+ s = r0[4];
+ if (s != 0.0) {
+ r1[4] -= m1 * s;
+ r2[4] -= m2 * s;
+ r3[4] -= m3 * s;
+ }
+ s = r0[5];
+ if (s != 0.0) {
+ r1[5] -= m1 * s;
+ r2[5] -= m2 * s;
+ r3[5] -= m3 * s;
+ }
+ s = r0[6];
+ if (s != 0.0) {
+ r1[6] -= m1 * s;
+ r2[6] -= m2 * s;
+ r3[6] -= m3 * s;
+ }
+ s = r0[7];
+ if (s != 0.0) {
+ r1[7] -= m1 * s;
+ r2[7] -= m2 * s;
+ r3[7] -= m3 * s;
}
- /* That was most of the work, one final pass of row/column interchange */
- /* to finish */
- for (k = 4 - 2; k >= 0; k--) { /* Don't need to work with 1 by 1 corner*/
- i = pvt_j[k]; /* Rows to swap correspond to pivot COLUMN */
- if (i != k) { /* If rows are different */
- for (j = 0; j < 4; j++) {
- hold = columns[k][j];
- columns[k][j] = -columns[i][j];
- columns[i][j] = hold;
- }
- }
+ /* choose pivot - or die */
+ if (Math::abs(r3[1]) > Math::abs(r2[1])) {
+ SWAP(r3, r2);
+ }
+ if (Math::abs(r2[1]) > Math::abs(r1[1])) {
+ SWAP(r2, r1);
+ }
+ ERR_FAIL_COND(0.0 == r1[1]);
+
+ /* eliminate second variable */
+ m2 = r2[1] / r1[1];
+ m3 = r3[1] / r1[1];
+ r2[2] -= m2 * r1[2];
+ r3[2] -= m3 * r1[2];
+ r2[3] -= m2 * r1[3];
+ r3[3] -= m3 * r1[3];
+ s = r1[4];
+ if (0.0 != s) {
+ r2[4] -= m2 * s;
+ r3[4] -= m3 * s;
+ }
+ s = r1[5];
+ if (0.0 != s) {
+ r2[5] -= m2 * s;
+ r3[5] -= m3 * s;
+ }
+ s = r1[6];
+ if (0.0 != s) {
+ r2[6] -= m2 * s;
+ r3[6] -= m3 * s;
+ }
+ s = r1[7];
+ if (0.0 != s) {
+ r2[7] -= m2 * s;
+ r3[7] -= m3 * s;
+ }
- j = pvt_i[k]; /* Columns to swap correspond to pivot ROW */
- if (j != k) { /* If columns are different */
- for (i = 0; i < 4; i++) {
- hold = columns[i][k];
- columns[i][k] = -columns[i][j];
- columns[i][j] = hold;
- }
- }
+ /* choose pivot - or die */
+ if (Math::abs(r3[2]) > Math::abs(r2[2])) {
+ SWAP(r3, r2);
}
+ ERR_FAIL_COND(0.0 == r2[2]);
+
+ /* eliminate third variable */
+ m3 = r3[2] / r2[2];
+ r3[3] -= m3 * r2[3];
+ r3[4] -= m3 * r2[4];
+ r3[5] -= m3 * r2[5];
+ r3[6] -= m3 * r2[6];
+ r3[7] -= m3 * r2[7];
+
+ /* last check */
+ ERR_FAIL_COND(0.0 == r3[3]);
+
+ s = 1.0 / r3[3]; /* now back substitute row 3 */
+ r3[4] *= s;
+ r3[5] *= s;
+ r3[6] *= s;
+ r3[7] *= s;
+
+ m2 = r2[3]; /* now back substitute row 2 */
+ s = 1.0 / r2[2];
+ r2[4] = s * (r2[4] - r3[4] * m2);
+ r2[5] = s * (r2[5] - r3[5] * m2);
+ r2[6] = s * (r2[6] - r3[6] * m2);
+ r2[7] = s * (r2[7] - r3[7] * m2);
+ m1 = r1[3];
+ r1[4] -= r3[4] * m1;
+ r1[5] -= r3[5] * m1;
+ r1[6] -= r3[6] * m1;
+ r1[7] -= r3[7] * m1;
+ m0 = r0[3];
+ r0[4] -= r3[4] * m0;
+ r0[5] -= r3[5] * m0;
+ r0[6] -= r3[6] * m0;
+ r0[7] -= r3[7] * m0;
+
+ m1 = r1[2]; /* now back substitute row 1 */
+ s = 1.0 / r1[1];
+ r1[4] = s * (r1[4] - r2[4] * m1);
+ r1[5] = s * (r1[5] - r2[5] * m1),
+ r1[6] = s * (r1[6] - r2[6] * m1);
+ r1[7] = s * (r1[7] - r2[7] * m1);
+ m0 = r0[2];
+ r0[4] -= r2[4] * m0;
+ r0[5] -= r2[5] * m0;
+ r0[6] -= r2[6] * m0;
+ r0[7] -= r2[7] * m0;
+
+ m0 = r0[1]; /* now back substitute row 0 */
+ s = 1.0 / r0[0];
+ r0[4] = s * (r0[4] - r1[4] * m0);
+ r0[5] = s * (r0[5] - r1[5] * m0),
+ r0[6] = s * (r0[6] - r1[6] * m0);
+ r0[7] = s * (r0[7] - r1[7] * m0);
+
+ MAT(out, 0, 0) = r0[4];
+ MAT(out, 0, 1) = r0[5];
+ MAT(out, 0, 2) = r0[6];
+ MAT(out, 0, 3) = r0[7];
+ MAT(out, 1, 0) = r1[4];
+ MAT(out, 1, 1) = r1[5];
+ MAT(out, 1, 2) = r1[6];
+ MAT(out, 1, 3) = r1[7];
+ MAT(out, 2, 0) = r2[4];
+ MAT(out, 2, 1) = r2[5];
+ MAT(out, 2, 2) = r2[6];
+ MAT(out, 2, 3) = r2[7];
+ MAT(out, 3, 0) = r3[4];
+ MAT(out, 3, 1) = r3[5];
+ MAT(out, 3, 2) = r3[6];
+ MAT(out, 3, 3) = r3[7];
+
+#undef MAT
+
+ *this = temp;
}
void Projection::flip_y() {
diff --git a/core/math/projection.h b/core/math/projection.h
index 5af43561c0..a163c08b85 100644
--- a/core/math/projection.h
+++ b/core/math/projection.h
@@ -2,9 +2,11 @@
/* projection.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/quaternion.cpp b/core/math/quaternion.cpp
index 08eac14b76..d342bc10cc 100644
--- a/core/math/quaternion.cpp
+++ b/core/math/quaternion.cpp
@@ -2,9 +2,11 @@
/* quaternion.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/quaternion.h b/core/math/quaternion.h
index 655e55e0a2..da2a960eca 100644
--- a/core/math/quaternion.h
+++ b/core/math/quaternion.h
@@ -2,9 +2,11 @@
/* quaternion.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp
index 6a60a5925d..76bd7122c4 100644
--- a/core/math/quick_hull.cpp
+++ b/core/math/quick_hull.cpp
@@ -2,9 +2,11 @@
/* quick_hull.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/quick_hull.h b/core/math/quick_hull.h
index d7ff880f1a..e4c5870ef6 100644
--- a/core/math/quick_hull.h
+++ b/core/math/quick_hull.h
@@ -2,9 +2,11 @@
/* quick_hull.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/random_number_generator.cpp b/core/math/random_number_generator.cpp
index 226d748c52..43ca07e761 100644
--- a/core/math/random_number_generator.cpp
+++ b/core/math/random_number_generator.cpp
@@ -2,9 +2,11 @@
/* random_number_generator.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/random_number_generator.h b/core/math/random_number_generator.h
index 7ec4cdffb0..4aa3e2b98f 100644
--- a/core/math/random_number_generator.h
+++ b/core/math/random_number_generator.h
@@ -2,9 +2,11 @@
/* random_number_generator.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/random_pcg.cpp b/core/math/random_pcg.cpp
index c286a60421..4267d765ed 100644
--- a/core/math/random_pcg.cpp
+++ b/core/math/random_pcg.cpp
@@ -2,9 +2,11 @@
/* random_pcg.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/random_pcg.h b/core/math/random_pcg.h
index 6bad70059f..699795c3b9 100644
--- a/core/math/random_pcg.h
+++ b/core/math/random_pcg.h
@@ -2,9 +2,11 @@
/* random_pcg.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/rect2.cpp b/core/math/rect2.cpp
index 7f77b0786c..2b7bb9bc33 100644
--- a/core/math/rect2.cpp
+++ b/core/math/rect2.cpp
@@ -2,9 +2,11 @@
/* rect2.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/rect2.h b/core/math/rect2.h
index 817923c134..1901cc2f7e 100644
--- a/core/math/rect2.h
+++ b/core/math/rect2.h
@@ -2,9 +2,11 @@
/* rect2.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/rect2i.cpp b/core/math/rect2i.cpp
index 807fe0707a..55da033222 100644
--- a/core/math/rect2i.cpp
+++ b/core/math/rect2i.cpp
@@ -2,9 +2,11 @@
/* rect2i.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/rect2i.h b/core/math/rect2i.h
index 5f3a3d54f5..4d19e444bd 100644
--- a/core/math/rect2i.h
+++ b/core/math/rect2i.h
@@ -2,9 +2,11 @@
/* rect2i.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/static_raycaster.cpp b/core/math/static_raycaster.cpp
index 9fa89a5f1e..1265ad34f2 100644
--- a/core/math/static_raycaster.cpp
+++ b/core/math/static_raycaster.cpp
@@ -2,9 +2,11 @@
/* static_raycaster.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/static_raycaster.h b/core/math/static_raycaster.h
index 74e4b75163..d29890e885 100644
--- a/core/math/static_raycaster.h
+++ b/core/math/static_raycaster.h
@@ -2,9 +2,11 @@
/* static_raycaster.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/transform_2d.cpp b/core/math/transform_2d.cpp
index f6525fe5ca..e08f1b7a6a 100644
--- a/core/math/transform_2d.cpp
+++ b/core/math/transform_2d.cpp
@@ -2,9 +2,11 @@
/* transform_2d.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/transform_2d.h b/core/math/transform_2d.h
index 1ee7d3d84f..e3f6182ec0 100644
--- a/core/math/transform_2d.h
+++ b/core/math/transform_2d.h
@@ -2,9 +2,11 @@
/* transform_2d.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/transform_3d.cpp b/core/math/transform_3d.cpp
index 2c91a7604b..b63946ecfb 100644
--- a/core/math/transform_3d.cpp
+++ b/core/math/transform_3d.cpp
@@ -2,9 +2,11 @@
/* transform_3d.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/transform_3d.h b/core/math/transform_3d.h
index b1de233445..2efdd94e69 100644
--- a/core/math/transform_3d.h
+++ b/core/math/transform_3d.h
@@ -2,9 +2,11 @@
/* transform_3d.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/transform_interpolator.cpp b/core/math/transform_interpolator.cpp
index 1cd35b3d1a..c47caaef9b 100644
--- a/core/math/transform_interpolator.cpp
+++ b/core/math/transform_interpolator.cpp
@@ -2,9 +2,11 @@
/* transform_interpolator.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -183,8 +185,9 @@ void TransformInterpolator::interpolate_basis_linear(const Basis &p_prev, const
r_result = p_prev.lerp(p_curr, p_fraction);
// It turns out we need to guard against zero scale basis.
- // This is kind of silly, as we should probably fix the bugs elsewhere in Godot that can't deal with
+ // This is kind of silly, as we should probably fix the bugs elsewhere in Redot that can't deal with
// zero scale, but until that time...
+ // TODO: Rewrite this ^
for (int n = 0; n < 3; n++) {
Vector3 &axis = r_result[n];
@@ -286,7 +289,7 @@ TransformInterpolator::Method TransformInterpolator::_test_basis(Basis p_basis,
r_needed_normalize = true;
}
- // Apply less stringent tests than the built in slerp, the standard Godot slerp
+ // Apply less stringent tests than the built in slerp, the standard Redot slerp
// is too susceptible to float error to be useful.
real_t det = p_basis.determinant();
if (!Math::is_equal_approx(det, 1, (real_t)0.01f)) {
@@ -341,7 +344,7 @@ bool TransformInterpolator::_basis_is_orthogonal(const Basis &p_basis, real_t p_
Basis identity;
Basis m = p_basis * p_basis.transposed();
- // Less stringent tests than the standard Godot slerp.
+ // Less stringent tests than the standard Redot slerp.
if (!_vec3_is_equal_approx(m[0], identity[0], p_epsilon) || !_vec3_is_equal_approx(m[1], identity[1], p_epsilon) || !_vec3_is_equal_approx(m[2], identity[2], p_epsilon)) {
return false;
}
diff --git a/core/math/transform_interpolator.h b/core/math/transform_interpolator.h
index cc556707e4..ee6c174f39 100644
--- a/core/math/transform_interpolator.h
+++ b/core/math/transform_interpolator.h
@@ -2,9 +2,11 @@
/* transform_interpolator.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp
index 01b733183d..af3aa43c0e 100644
--- a/core/math/triangle_mesh.cpp
+++ b/core/math/triangle_mesh.cpp
@@ -2,9 +2,11 @@
/* triangle_mesh.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/triangle_mesh.h b/core/math/triangle_mesh.h
index 24fc12dda9..2debe41e89 100644
--- a/core/math/triangle_mesh.h
+++ b/core/math/triangle_mesh.h
@@ -2,9 +2,11 @@
/* triangle_mesh.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp
index 5923423b92..2f8b41de99 100644
--- a/core/math/triangulate.cpp
+++ b/core/math/triangulate.cpp
@@ -2,9 +2,11 @@
/* triangulate.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/triangulate.h b/core/math/triangulate.h
index 0b88f7ec4c..42dde911a1 100644
--- a/core/math/triangulate.h
+++ b/core/math/triangulate.h
@@ -2,9 +2,11 @@
/* triangulate.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector2.cpp b/core/math/vector2.cpp
index 0590ee8a37..b54e185b4d 100644
--- a/core/math/vector2.cpp
+++ b/core/math/vector2.cpp
@@ -2,9 +2,11 @@
/* vector2.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector2.h b/core/math/vector2.h
index edb47db6fd..dd5d1fa538 100644
--- a/core/math/vector2.h
+++ b/core/math/vector2.h
@@ -2,9 +2,11 @@
/* vector2.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector2i.cpp b/core/math/vector2i.cpp
index 790f564734..ae5b6b7fd1 100644
--- a/core/math/vector2i.cpp
+++ b/core/math/vector2i.cpp
@@ -2,9 +2,11 @@
/* vector2i.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector2i.h b/core/math/vector2i.h
index fff9b0a658..5a2154a321 100644
--- a/core/math/vector2i.h
+++ b/core/math/vector2i.h
@@ -2,9 +2,11 @@
/* vector2i.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index e18ac3b011..7560528bb9 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -2,9 +2,11 @@
/* vector3.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 14bc44c4e7..35a69d3860 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -2,9 +2,11 @@
/* vector3.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector3i.cpp b/core/math/vector3i.cpp
index 93f9d15ac1..0264a76155 100644
--- a/core/math/vector3i.cpp
+++ b/core/math/vector3i.cpp
@@ -2,9 +2,11 @@
/* vector3i.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector3i.h b/core/math/vector3i.h
index 40d0700bf7..c3c9dff575 100644
--- a/core/math/vector3i.h
+++ b/core/math/vector3i.h
@@ -2,9 +2,11 @@
/* vector3i.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector4.cpp b/core/math/vector4.cpp
index b6b914f36d..603446baf9 100644
--- a/core/math/vector4.cpp
+++ b/core/math/vector4.cpp
@@ -2,9 +2,11 @@
/* vector4.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector4.h b/core/math/vector4.h
index 9197e3587a..cbd784b8be 100644
--- a/core/math/vector4.h
+++ b/core/math/vector4.h
@@ -2,9 +2,11 @@
/* vector4.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector4i.cpp b/core/math/vector4i.cpp
index afa77a4988..1ce8306183 100644
--- a/core/math/vector4i.cpp
+++ b/core/math/vector4i.cpp
@@ -2,9 +2,11 @@
/* vector4i.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/core/math/vector4i.h b/core/math/vector4i.h
index a9036d684a..b152766897 100644
--- a/core/math/vector4i.h
+++ b/core/math/vector4i.h
@@ -2,9 +2,11 @@
/* vector4i.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */