summaryrefslogtreecommitdiffstats
path: root/core/math/expression.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Static analyzer fixes:bruvzg2020-12-091-27/+0
| | | | | | Removes unused code in OS. Fixes return types. Fixes few typos.
* Refactor variant built-in methods yet again.reduz2020-11-111-5/+5
| | | | | | * Using C-style function pointers now, InternalMethod is gone. * This ensures much better performance in typed code. * Renamed builtin_funcs to utility_funcs, to avoid naming confusion
* Create Variant built-in functions.reduz2020-11-101-700/+13
| | | | | | | -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
* Refactored variant constructor logicreduz2020-11-091-2/+2
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-30/+3
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Refactored variant setters/gettersreduz2020-11-071-1/+1
| | | | | | -Discern between named, indexed and keyed -Get direct access to functions for typed GDScript and GDNative bindings -Small changes to some classes in order to work with the new setget binder
* Exposed randi_range to global funcs + renamed rand_range to randf_rangeYuri Roubinsky2020-11-061-5/+12
|
* [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-10/+10
|
* Make all String float conversion methods be 64-bitAaron Franke2020-07-271-1/+1
|
* Merge pull request #38713 from aaronfranke/string-64bitRémi Verschelde2020-07-011-1/+1
|\ | | | | Make all String integer conversion methods be 64-bit
| * Remove 32-bit String to_int methodAaron Franke2020-06-031-1/+1
| |
* | Fix for Expression class: inner string can be single quotedntfs.hard2020-06-021-1/+3
|/
* Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-191-24/+24
| | | | | | | | | | Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-31/+61
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-158/+0
| | | | | | | | | | | | | | 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.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-11/+0
| | | | | | | | | | 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.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-45/+135
| | | | Part of #33027.
* Replace NULL with nullptrlupoDharkael2020-04-021-39/+39
|
* Fix out of bound array access caused by unassigned variableRafał Mikrut2020-04-011-0/+2
|
* Fix various typosluz.paz2020-03-111-1/+1
| | | Found via `codespell`
* Merge pull request #36515 from reduz/packed-array-64-bitsRémi Verschelde2020-02-251-5/+5
|\ | | | | Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
| * Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
* | Expression: Fix parsing integers as 32-bitRémi Verschelde2020-02-251-1/+1
|/
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-27/+27
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-9/+9
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Remove more deprecated methods and codeRémi Verschelde2020-02-131-8/+2
|
* Remove deprecated decimals builtinRémi Verschelde2020-02-121-7/+0
| | | | Replaced by 'step_decimals' in 3.2 via #21425.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | 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.
* Add ord() function to Expression classDanil Alexeev2019-12-291-0/+28
| | | | | The ord() function was recently added in GDScript and VisualScript, but was missed in the Expression class.
* Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily2019-08-171-8/+3
| | | | | | | | | Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
* Merge pull request #30693 from Chaosus/lerp_angleRémi Verschelde2019-07-201-0/+9
|\ | | | | Added lerp_angle built-in function
| * Added lerp_angles built-in functionChaosus2019-07-201-0/+9
| | | | | | | | | | Co-authored-by: Xrayez <https://github.com/Xrayez> Co-authored-by: DleanJeans <https://github.com/DleanJeans>
* | Merge pull request #30576 from qarmin/lgtm_coverageRémi Verschelde2019-07-201-5/+1
|\ \ | |/ |/| Changed some code reported by LGTM and Coverity
| * Changed some code showed in LGTM and Coverageqarmin2019-07-201-5/+1
| |
* | Add integer posmod and rename default arg namesAaron Franke2019-07-181-0/+8
|/ | | | | "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.
* Some code changed with Clang-Tidyqarmin2019-06-261-1/+1
|
* Added move_toward functions for float, Vector2 and Vector3Giacom2019-05-281-0/+9
|
* Make "decimal" functions more consistentAaron Franke2019-04-301-0/+7
| | | | In GDScript, rename "decimals" to "step_decimals". In C#, add "StepDecimals", but keep the old functionality in a method called "DecimalCount".
* Style: Apply new changes from clang-format 8.0Rémi Verschelde2019-04-091-2/+4
| | | | | | It seems to stay compatible with formatting done by clang-format 6.0 and 7.0, so contributors can keep using those versions for now (they will not undo those changes).
* Merge pull request #27231 from Chaosus/smoothstepRémi Verschelde2019-04-081-0/+8
|\ | | | | Added smoothstep built-in function
| * Added smoothstep built-in functionChaosus2019-04-071-0/+8
| |
* | Add object encoding param to serialization methodsFabio Alessandrelli2019-04-011-5/+7
|/ | | | | | | | | Network peers get_var/put_var File get_var/store_var GDScript/Mono/VisualScript bytes2var/var2bytes Add MultiplayerAPI.allow_object_decoding member which deprecates PacketPeer.allow_object_decoding. Break ABI compatibaility (API compatibility for GDNative).
* Add -Wshadow=local to warnings and fix reported issues.marxin2019-02-201-31/+31
| | | | Fixes #25316.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Moved member variables to initializer listWilson E. Alvarez2018-12-111-7/+7
|
* 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.
* Add support for '.[0-9]' numbers in ExpressionRémi Verschelde2018-10-011-14/+21
| | | | Fixes #21874, supersedes #22065.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-7/+7
| | | | | | 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.