summaryrefslogtreecommitdiffstats
path: root/core/math
Commit message (Collapse)AuthorAgeFilesLines
* TileSet/TileMap: Decompose solid non-convex polygons into convexes. Real fix ↵Mariano Suligoy2019-03-042-0/+37
| | | | for #24003
* Scale quickhull tolerance with mesh sizeHein-Pieter van Braam2019-03-012-3/+3
| | | | | Taken from three.js's implementation. Tested with a wide variety of meshes.
* Remove setting that caused is_inside_tree() errors on doppler tracking enabled.Juan Linietsky2019-02-261-8/+2
|
* Several fixes to make GLES2 on HTML5 work much better.Juan Linietsky2019-02-256-33/+72
| | | | Changed math class error reporting to be a bit less paranoid.
* Fix wrapi to use int64_t instead intChaosus2019-02-251-2/+2
|
* Fix crash when using `wrapi()` with a range of zeroHugo Locurcio2019-02-231-3/+3
| | | | | `wrapi()` and `wrapf()` will now return the value of the `min` parameter if the range is equal to zero.
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-205-56/+56
| | | | Fixes #25316.
* fixed AStar improper point deletion (leads to crash)hedin2019-02-201-5/+8
|
* Merge pull request #25680 from Chaosus/random_fixRémi Verschelde2019-02-161-1/+4
|\ | | | | Fix random generation, to not always retrieve 0 after seed()
| * Fix random generation, to not retrieve 0 after seed()Chaosus2019-02-101-1/+4
| |
* | Fix typo for randd and randfPierrick Brunet2019-02-161-2/+2
| | | | | | | | * And improve documentation according to issue #25938
* | Merge pull request #25821 from akien-mga/sync-class-and-filenamesRémi Verschelde2019-02-133-3/+3
|\ \ | | | | | | Ensure classes match their header filename
| * | Core: Ensure classes match their header filenameRémi Verschelde2019-02-123-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also drop some unused files. Renamed: - `core/dvector.h` -> `pool_vector.h` - `core/io/resource_import.h` -> `resource_importer.h` - `core/sort.h` -> `sort_array.h` - `core/string_db.h` -> `string_name.h` Dropped: - `core/allocators.h` - `core/os/shell.h` - `core/variant_construct_string.cpp`
* | | [Core] Transform2D add set_scale and fix set_rotationAaron Franke2019-02-123-4/+13
|/ / | | | | | | Note: These are still not exposed to GDScript
* / [Core] Rename Matrix3 file to BasisAaron Franke2019-02-096-10/+10
|/ | | The code already referred to "Basis", it's just the file name that was different for some reason.
* Fix AStar crashing with large (>1e30) estimated valuesBojidar Marinov2019-01-301-2/+2
| | | | Fixes #21601
* Revert "Revert "Update random_pcg.h""Rémi Verschelde2019-01-231-2/+2
| | | | | | This reverts commit 6f704c338aa7448a65ced554804ae568063f35eb. Sorry about this, this was a test and not meant to be pushed to master. :/
* Revert "Update random_pcg.h"Rémi Verschelde2019-01-231-2/+2
| | | | This reverts commit 64e584a97e0505cec592d3c98a2899ba8426f35a.
* Fix HTML5 build warningLeon Krause2019-01-201-2/+2
|
* Revert "fixed invalid implementation of Plane::intersects_segment and ↵Rémi Verschelde2019-01-131-3/+5
| | | | Plane::intersects_ray"
* fixed invalid implementations of Plane::intersects_segment and ↵Evgeny Savelyev2019-01-121-5/+3
| | | | Plane::intersects_ray
* Removed splits in Polygon editor, replace by internal vertices and polygon ↵Juan Linietsky2019-01-082-1/+33
| | | | support.
* Update random_pcg.hCalamander2019-01-071-2/+2
| | | little fix to function types
* Update copyright statements to 2019Rémi Verschelde2019-01-0149-98/+98
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #24135 from Chaosus/rngRémi Verschelde2018-12-122-2/+8
|\ | | | | Added ranged integer generation function to RNG class
| * Added integer number generation function to RNG classChaosus2018-12-062-2/+8
| |
* | Moved member variables to initializer listWilson E. Alvarez2018-12-114-23/+28
|/
* Remove trailing whitespaceRémi Verschelde2018-11-201-2/+2
| | | | | With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'` (+ manual revert of some thirdparty code under `platform/android`).
* Ensure that array passed to physics is always counter clockwise, fixes #15361.Juan Linietsky2018-11-141-0/+15
|
* Implement random number generatorChaosus2018-11-136-17/+233
| | | | Co-authored-by: Zirak <zirakertan@gmail.com>
* Remove unused "dtoll" methodsAaron Franke2018-11-021-10/+0
| | | These methods aren't used anywhere in Godot's code, and all they do is cast floating types to int64_t. There's no reason to have these lines, they literally do nothing, and they aren't useful functions to begin with.
* Error running Expression.execute after parse errorsantouits2018-10-281-0/+4
| | | | There happens a segmentation fault when you use Expression.parse() and you don't check for errors and then run Expression.execute(). So we check if there was a parse error in the execute method now.
* Merge pull request #22722 from akien-mga/fix-warningsRémi Verschelde2018-10-071-4/+5
|\ | | | | Fix more "may be used initialized" warnings from GCC 7
| * Fix more "may be used initialized" warnings from GCC 7Rémi Verschelde2018-10-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following GCC 7 warnings: ``` core/cowdata.h:269:47: warning: 'alloc_size' may be used uninitialized in this function [-Wmaybe-uninitialized] core/error_macros.h:163:26: warning: 'nearest_point' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:1579:5: warning: 'colormap_size' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:1582:12: warning: 'size_height' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:1590:23: warning: 'size_width' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:1599:29: warning: 'pixel_size' may be used uninitialized in this function [-Wmaybe-uninitialized] core/math/face3.cpp:207:15: warning: 'tri_max' may be used uninitialized in this function [-Wmaybe-uninitialized] core/math/face3.cpp:209:15: warning: 'tri_min' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/rasterizer_scene_gles3.cpp:665:22: warning: 'best_used_frame' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/rasterizer_storage_gles3.cpp:865:27: warning: 'blit_target' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/rasterizer_storage_gles3.cpp:980:29: warning: 'blit_target' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/shader_gles3.h:122:9: warning: '<anonymous>.ShaderGLES3::Version::frag_id' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/shader_gles3.h:122:9: warning: '<anonymous>.ShaderGLES3::Version::id' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/gles3/shader_gles3.h:122:9: warning: '<anonymous>.ShaderGLES3::Version::vert_id' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/plugins/script_editor_plugin.cpp:1980:31: warning: 'se' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/scene_tree_dock.cpp:840:30: warning: 'new_node' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4259:9: warning: 'a1' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4259:9: warning: 'lll' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4259:9: warning: 'lul' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4260:9: warning: 'a2' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4261:9: warning: 'a3' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4265:3: warning: 'enable_lin' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4294:3: warning: 'enable_ang' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4311:34: warning: 'll' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/spatial_editor_gizmos.cpp:4311:34: warning: 'ul' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1655:47: warning: 'cone_dirs' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1656:73: warning: 'cone_weights' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/gui/texture_progress.cpp:181:6: warning: 'cp' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/gui/texture_progress.cpp:181:6: warning: 'cq' may be used uninitialized in this function [-Wmaybe-uninitialized] servers/physics/shape_sw.cpp:1056:19: warning: 'support_max' may be used uninitialized in this function [-Wmaybe-uninitialized] ```
* | Remove redundant "== false" codeAaron Franke2018-10-066-26/+26
| | | | | | | | | | | | Some of this code has been re-organized. f
* | Fix warnings in HTML5 build outside platform filesLeon Krause2018-10-061-1/+1
|/
* Fix warnings on release builds (not DEBUG_ENABLED)Rémi Verschelde2018-10-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes the following Clang 5 warnings: ``` modules/bmp/image_loader_bmp.cpp:46:60: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] modules/bmp/image_loader_bmp.cpp:48:61: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] drivers/png/image_loader_png.cpp:231:20: warning: comparison of unsigned expression >= 0 is always true [-Wtautological-compare] scene/gui/graph_edit.cpp:1045:8: warning: comparison of constant 0 with expression of type 'bool' is always false [-Wtautological-constant-out-of-range-compare] core/class_db.cpp:812:13: warning: unused variable 'check' [-Wunused-variable] core/io/file_access_pack.cpp:172:11: warning: unused variable 'ver_rev' [-Wunused-variable] core/math/bsp_tree.cpp:195:13: warning: unused variable 'plane' [-Wunused-variable] core/math/bsp_tree.cpp:168:6: warning: unused variable 'plane_count' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:685:10: warning: unused variable 'ok' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:706:10: warning: unused variable 'ok' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:755:19: warning: unused variable 'var_type' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:1306:12: warning: unused variable 'err' [-Wunused-variable] modules/gdscript/gdscript_function.cpp:158:15: warning: unused function '_get_var_type' [-Wunused-function] modules/gdscript/gdscript_parser.cpp:750:20: warning: unused variable 'lv' [-Wunused-variable] modules/gdscript/gdscript_parser.cpp:59:15: warning: unused function '_find_function_name' [-Wunused-function] scene/main/node.cpp:2489:13: warning: unused function '_Node_debug_sn' [-Wunused-function] ```
* Merge pull request #21492 from Maykeye/astarRémi Verschelde2018-10-021-17/+5
|\ | | | | Changed A* exit condition, added 2 tests for it
| * Changed A* exit condition, added 2 tests for itMaykeye2018-08-281-17/+5
| | | | | | | | | | | | | | | | | | | | A* now exits when next node from open set with least cost happens to be end_point, not when node with least cost has end_point as a neigbour. Added two tests for astar: * ABC tests case where start and end node are neigbours * ABCX tests case with intermediate nodes
* | Add support for '.[0-9]' numbers in ExpressionRémi Verschelde2018-10-011-14/+21
| | | | | | | | Fixes #21874, supersedes #22065.
* | SCons: Build core's thirdparty code in own environmentRémi Verschelde2018-09-281-2/+0
| | | | | | | | Also move Zlib and Zstd's build instructions to core/SCsub.
* | Removed obsoleted core/helper/value_evaluator.h and moved math_fieldwise to ↵DualMatrix2018-09-232-0/+223
| | | | | | | | | | | | core/math/ Removed obsoleted core/helper/value_evaluator.h and moved math_fieldwise to core/math/
* | Fix: Strip integer part in "decimals"Aaron Franke2018-09-191-5/+7
| | | | | | Note: Core only.
* | Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde2018-09-132-2/+2
|\ \ | | | | | | Misc. typos
| * | Misc. typosluz.paz2018-09-122-2/+2
| | | | | | | | | Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
* | | Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-1236-99/+114
|/ / | | | | | | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* / Add missing copyright headersRémi Verschelde2018-08-294-1/+90
|/
* Merge pull request #21205 from KellyThomas/c-sharp-feature-parity-quatIgnacio Etcheverry2018-08-271-1/+1
|\ | | | | [Mono] Quat - add some missing constructors and methods
| * mono: Quat - add some missing constructors and methodsKelly Thomas2018-08-241-1/+1
| |
* | Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-243-23/+1
| |