summaryrefslogtreecommitdiff
path: root/core/math/expression.h
AgeCommit message (Collapse)Author
2022-06-27Add a const call mode to Object, Variant and Script.K. S. Ernest (iFire) Lee
For this to work safely (user not call queue_free or something in the expression), a const call mode was added to Object and Variant (and optionally Script). This mode ensures only const functions can be called, making it safe to use from the editor. Co-Authored-By: reduz <reduzio@gmail.com>
2022-05-11Implement exponential operator (**) to GDScript/ExpressionsYuri Roubinsky
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-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-11-23Initialize class/struct variables with default values in core/ and drivers/Rafał Mikrut
2020-11-10Create Variant built-in functions.reduz
-Moved Expression to use this, removed its own. -Eventually GDScript/VisualScript/GDNative need to be moved to this. -Given the JSON functions were hacked-in, removed them and created a new JSONParser class -Made sure these functions appear properly in documentation, since they will be removed from GDScript
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-11-06Exposed randi_range to global funcs + renamed rand_range to randf_rangeYuri Roubinsky
2020-08-27Add a test suite for ExpressionHugo Locurcio
This also makes the first parameter of `Expression::execute()` optional from C++. Previously, it was only optional in the scripting API.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-14Port member initialization from constructor to declaration (C++11)Rémi Verschelde
Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-12Remove deprecated decimals builtinRémi Verschelde
Replaced by 'step_decimals' in 3.2 via #21425.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-29Add ord() function to Expression classDanil Alexeev
The ord() function was recently added in GDScript and VisualScript, but was missed in the Expression class.
2019-07-20Added lerp_angles built-in functionChaosus
Co-authored-by: Xrayez <https://github.com/Xrayez> Co-authored-by: DleanJeans <https://github.com/DleanJeans>
2019-07-18Add integer posmod and rename default arg namesAaron Franke
"posmod" is the integer version of "fposmod". We do not need a "mod" because of the % operator. I changed the default arg names from "x" and "y" to "a" and "b" because they are not coordinates. I also changed pow's arg names to "base" and "exp". Also, I reorganized the code in the VS built-in funcs switch statement.
2019-06-19Made use of semicolons more consitent, fixed formattingJohnJLight
2019-05-28Added move_toward functions for float, Vector2 and Vector3Giacom
2019-04-30Make "decimal" functions more consistentAaron Franke
In GDScript, rename "decimals" to "step_decimals". In C#, add "StepDecimals", but keep the old functionality in a method called "DecimalCount".
2019-04-07Added smoothstep built-in functionChaosus
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-11Moved member variables to initializer listWilson E. Alvarez
2018-08-29Add missing copyright headersRémi Verschelde
2018-08-08Ability to pass custom variables to expression.Juan Linietsky
2018-08-08-Add Expression class, used to evaluate expressionsJuan Linietsky
-Added expression evaluation to EditorSpinSlider, fixes #20813, fixes #18932