summaryrefslogtreecommitdiff
path: root/tests/core/math
AgeCommit message (Collapse)Author
2023-01-28Add support for interpolating skewed transformsAaron Franke
2023-01-23Convert en_GB spelling to en_US with codespellRémi Verschelde
2023-01-15Rename `center` method to `get_center` in Plane.Raul Santos
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-11-24Merge pull request #68386 from MewPurPur/snappedi-snappedfRémi Verschelde
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
2022-11-19Implement snappedi, snappedf, and Vector[2/3/4]i.snappedVolTer
2022-11-09Generic math function tests: Test float and double variantsHendrik Brucker
2022-11-05[Tests] Replace Math::is_equal_approx with == and doctest::ApproxHendrik Brucker
2022-11-04Add a test suite for `Math::` namespace functionsHendrik Brucker
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-11-02Allow getting Quaternion rotation in different Euler ordersAaron Franke
2022-11-02Merge pull request #66747 from aaronfranke/move-euler-orderRémi Verschelde
Move EulerOrder enum to math_defs.h and global scope
2022-11-02Move EulerOrder enum to math_defs.h and global scopeAaron Franke
2022-11-02Style: Misc docs and comment style and language fixesRémi Verschelde
- Removed empty paragraphs in XML. - Consistently use bold style for "Example:", on a new line. - Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`). - Fix invalid usage of backticks for inline code in BBCode. - Fix some American/British English spelling inconsistencies. - Other minor fixes spotted along the way, including typo fixes with codespell. - Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-01Replace Quaternion Euler constructor with `from_euler` methodAaron Franke
2022-10-27Simplify Euler order test code in test_basis.hAaron Franke
2022-10-21Clean up Basis from Euler codeAaron Franke
2022-10-08Add `is_finite` method for checking built-in typesHaoyu Qiu
2022-10-03Merge pull request #66133 from aaronfranke/set-allRémi Verschelde
Delete `set_all`, `set_axis`, and `get_axis` methods from Vector2/3/3i/4/4i
2022-09-30Fix typos with codespellRémi Verschelde
Using codespell 2.3-dev from current git. And fix typo in `methods.py` for `vsproj=yes` option (still won't work though).
2022-09-25Add more tests for Vector* typesMicky
2022-09-19Remove set_axis and get_axis methods from Vector2/2i/3/3i/4/4iAaron Franke
2022-09-14Test, refactor and fix a bug in Basis.get_axis_anglefabriceci
2022-09-04Replace Rect2(i) has_no_area with has_areaAaron Franke
2022-09-04Replace AABB has_no_volume with has_volumeAaron Franke
Also replace has_no_surface with has_surface
2022-08-30Fix Geometry3D::get_closest_points_between_segments() returns NaNMarcel Admiraal
Also fix: - Geometry3D::get_closest_distance_between_segments() returning incorrect values. - Test for Geometry3D::get_closest_distance_between_segments() testing for an incorrect value.
2022-08-26Rename `str2var` to `str_to_var` and similarMicky
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too. - `var2str` -> `var_to_str` - `str2var` -> `str_to_var` - `bytes2var` -> `bytes_to_var` - `bytes2var_with_objects` -> `bytes_to_var_with_objects` - `var2bytes` -> `var_to_bytes` - `var2bytes_with_objects` -> `var_to_bytes_with_objects` - `linear2db` -> `linear_to_db` - `db2linear` -> `db_to_linear` - `deg2rad` -> `deg_to_rad` - `rad2deg` -> `rad_to_deg` - `dict2inst` -> `dict_to_inst` - `inst2dict` -> `inst_to_dict`
2022-08-09vector4 distance_squared_to and update csharpantonWetzel
2022-08-07Vector4/Vector4i: Add missing methods, tests and fix change of sign operatorHendrik Brucker
2022-08-04Tests: Silence some intentional errorsRémi Verschelde
Also fix printing messages in ClassDB test.
2022-08-04Add tests file for Quaternion unit tests, with initial UTscodepatzer
- Test constructors and quaternion product. - Add test case for Axis-Angle construction about Y-axis. - Add test case for xform of i-, j-, & k-unit vectors. - Add test case for construction from Basis. - Add test case for xform of arbitrary vector. - Add stress test case: many Quaternions xform many vectors. - Make comments consistent with style guide.
2022-08-02Fix consistency of translated/scaled/rotated in Transform2D and Transform3DFabian Keller
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-05Implemented tests for Plane getters and setters.cabinboy1031
Added tests for intersection and plane-point methods.
2022-06-16Make AStar to use 64-bit logicYuri Rubinsky
2022-05-10Merge pull request #59643 from kneejuicer/geometry2D-testsRémi Verschelde
Add extra unit tests for Geometry2D
2022-05-03Rename Basis get_axis to get_column, remove redundant methodsAaron Franke
2022-04-13Color: Rename `to_srgb`/`to_linear` to include base color spaceRémi Verschelde
This helps reduce confusion around sRGB <> Linear conversions by making both input and output color spaces explicit.
2022-04-07Remove unused legacy testsRémi Verschelde
They haven't been updated for years and still use the old MainLoop basic framework instead of the new doctest one. They're of dubious quality and best redone from scratch using the new framework.
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-03-29Add extra unit tests for Geometry2Dkneejuicer
2022-03-28Expose Color's `to_linear()` and `to_srgb()` to scriptingHugo Locurcio
2022-03-20Rename `AStar` to `AStar3D`Yuri Roubinsky
2022-03-17Update color constants to use HEX codestaigi100
2022-03-12Fix Slerp C# docs and add test cases for vectors in the same directionAaron Franke
2022-02-10Fix typos with codespellRémi Verschelde
Using codespell 2.2-dev from current git. Added `misc/scripts/codespell.sh` to make it easier to run it once in a while and update the skip and ignore lists.
2022-02-05Merge pull request #57620 from Haydoggo/expression-exp-fixRémi Verschelde
Fix Expression's parsing of positive exponent literals
2022-02-05Make parser treat all exponent literals as floatHayden
2022-02-04Core: Move Vector2i to its own `vector2i.h` headerRémi Verschelde
Also reduce interdependencies and clean up a bit.
2022-02-04Core: Move Rect2i to its own `rect2i.h` headerRémi Verschelde
And take the opportunity to improve interdependencies a bit with forward declares where possible.
2022-02-04Cleanup and move char functions to the `char_utils.h` header.bruvzg