Skip to content

Commit

Permalink
Core: Convert Math class to namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Repiteo committed Jul 16, 2024
1 parent 97b8ad1 commit 130c7f6
Show file tree
Hide file tree
Showing 8 changed files with 668 additions and 656 deletions.
3 changes: 2 additions & 1 deletion core/math/math_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
#include "math_funcs.h"

#include "core/error/error_macros.h"
#include "core/math/random_pcg.h"

RandomPCG Math::default_rand(RandomPCG::DEFAULT_SEED, RandomPCG::DEFAULT_INC);
static RandomPCG default_rand(RandomPCG::DEFAULT_SEED, RandomPCG::DEFAULT_INC);

uint32_t Math::rand_from_seed(uint64_t *seed) {
RandomPCG rng = RandomPCG(*seed, RandomPCG::DEFAULT_INC);
Expand Down
1,315 changes: 660 additions & 655 deletions core/math/math_funcs.h

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "navigation_region_3d_gizmo_plugin.h"

#include "core/math/random_pcg.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "scene/3d/navigation_region_3d.h"
#include "servers/navigation_server_3d.h"
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/tiles/tile_data_editors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "tile_set_editor.h"

#include "core/math/geometry_2d.h"
#include "core/math/random_pcg.h"
#include "core/os/keyboard.h"

#include "editor/editor_node.h"
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/tiles/tile_map_layer_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

#include "core/input/input.h"
#include "core/math/geometry_2d.h"
#include "core/math/random_pcg.h"
#include "core/os/keyboard.h"

TileMapLayer *TileMapLayerSubEditorPlugin::_get_edited_layer() const {
Expand Down
1 change: 1 addition & 0 deletions scene/2d/navigation_region_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "navigation_region_2d.h"

#include "core/math/geometry_2d.h"
#include "core/math/random_pcg.h"
#include "scene/resources/world_2d.h"
#include "servers/navigation_server_2d.h"

Expand Down
1 change: 1 addition & 0 deletions scene/2d/tile_map_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "tile_map_layer.h"

#include "core/io/marshalls.h"
#include "core/math/random_pcg.h"
#include "scene/2d/tile_map.h"
#include "scene/gui/control.h"
#include "scene/resources/world_2d.h"
Expand Down
1 change: 1 addition & 0 deletions scene/3d/navigation_region_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "navigation_region_3d.h"

#include "core/math/random_pcg.h"
#include "scene/resources/3d/navigation_mesh_source_geometry_data_3d.h"
#include "servers/navigation_server_3d.h"

Expand Down

0 comments on commit 130c7f6

Please sign in to comment.