summaryrefslogtreecommitdiffstats
path: root/core/variant/variant_op.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #818 from Spartan322/fixup/copyright-headersGeorge L. Albany2024-10-271-2/+2
|\ | | | | Fix copyright headers referring to Godot
| * Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Merge commit godotengine/godot@61accf060515416da07d913580419fd8c8490f7bSpartan3222024-10-261-0/+2
|\ \ | |/ |/|
| * Allow use RID with `in` operator for Arrays and DictionariesYevhen Babiichuk (DustDFG)2024-10-211-0/+2
| | | | | | | | Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Add PackedVector4Array Variant typeK. S. Ernest (iFire) Lee2024-05-031-1/+12
| | | | | Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Update lingering `do/while(0)` definesThaddeus Crews2024-04-041-4/+6
|
* Enforce template syntax `typename` over `class`Thaddeus Crews2024-03-071-1/+1
|
* Add and expose Basis/Transform2D/3D division by float operatorAaron Franke2023-12-201-0/+9
|
* Add operator NOT for all Variant typesGeorge Marques2023-03-101-0/+33
|
* Fix `Variant::in()` error on invalid `evaluate`cdemirer2023-02-131-2/+5
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Unify String and StringNamerune-scape2022-12-051-55/+62
|
* Merge pull request #66361 from dalexeev/remove-int-plus-stringRémi Verschelde2022-11-021-2/+0
|\ | | | | | | Unexpose confusing `String + int` and `int + String` operations
| * Remove confusing `String + int` and `int + String` operationsDanil Alexeev2022-09-241-2/+0
| |
* | Support for checking that Projection is(not) nullRafał Mikrut2022-11-011-0/+4
| |
* | Remove duplicate operator registrationsVolTer2022-10-201-6/+0
|/
* Add `operator*` to `Plane`PrecisionRender2022-07-301-0/+2
|
* Implement Vector4, Vector4i, Projectionreduz2022-07-231-0/+131
| | | | | | | | | | | | | Implement built-in classes Vector4, Vector4i and Projection. * Two versions of Vector4 (float and integer). * A Projection class, which is a 4x4 matrix specialized in projection types. These types have been requested for a long time, but given they were very corner case they were not added before. Because in Godot 4, reimplementing parts of the rendering engine is now possible, access to these types (heavily used by the rendering code) becomes a necessity. **Q**: Why Projection and not Matrix4? **A**: Godot does not use Matrix2, Matrix3, Matrix4x3, etc. naming convention because, within the engine, these types always have a *purpose*. As such, Godot names them: Transform2D, Transform3D or Basis. In this case, this 4x4 matrix is _always_ used as a _Projection_, hence the naming.
* Implement exponential operator (**) to GDScript/ExpressionsYuri Roubinsky2022-05-111-0/+6
|
* Unify TextServer built-in module and GDExtension code.bruvzg2022-03-171-0/+1
|
* [GDExtension] Add binds for missing methods, operators, and constants ↵bruvzg2022-02-081-0/+5
| | | | required for GDExtension TextServer implementation.
* Fix integer vector mul/div operators and bindings.reduz2022-02-061-6/+126
| | | | | | | * Vector2i and Vector3i mul/div by a float results in Vector2 and Vector3 respectively. * Create specializations to allow proper bindings. This fixes #44408 and supersedes #44441 and keeps the same rule of int <op> float returnig float, like with scalars.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Add Variant `in` operator for any String/StringName operandsGeorge Marques2021-10-061-1/+4
| | | | | | Allow using String or StringName types as operand in any position of the `in` operator, which is more convenient in scripting when interacting with data in the engine (such as a Node name).
* Allow comparing equality between builtin types and nullGeorge Marques2021-09-171-0/+136
|
* Fix crash when dividing by 0 in Vector2/3iRafał Mikrut2021-08-151-4/+4
|
* Implement native extension systemreduz2021-06-251-2/+2
| | | | | | * Deprecates GDNative in favor of a simpler, lower level interface. * New extension system allows registering core engine classes. * Simple header interface in gdnative_interace.h
* Merge pull request #49287 from reduz/expose-variant-internal-bindersRémi Verschelde2021-06-191-1336/+1
|\ | | | | Make some Variant internal functions public.
| * Make some variant internal functions public.reduz2021-06-171-1336/+1
| | | | | | | | | | -Make constructors, ops and setget inline functions public -Should help optimizing the GDScript VM
* | Allow multiplying Transforms and Basis by numbersAaron Franke2021-06-151-0/+6
|/
* Rename Quat to QuaternionMarcel Admiraal2021-06-041-21/+21
|
* Rename Variant TRANSFORM to TRANSFORM3DAaron Franke2021-06-031-12/+12
| | | Also _transform to _transform3d
* Rename Transform to Transform3D in coreAaron Franke2021-06-031-12/+12
|
* Merge pull request #35245 from qarmin/unsigned_bit_shiftRémi Verschelde2021-05-031-0/+16
|\ | | | | Don't allow to use in bit shift negative operands
| * Don't allow to use in bit shift negative operandsRafał Mikrut2021-03-041-0/+16
| |
* | Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-4/+4
|/ | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* Merge pull request #44427 from briansemrau/fix-variant-bitand-validated-evalRémi Verschelde2021-01-111-0/+1
|\ | | | | Fix bitwise-and eval not updating return type
| * Fix bitwise-and eval not updating return typeBrian Semrau2020-12-161-0/+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 🎆
* Fix subtracting colors and quatsTomasz Chabora2020-12-031-0/+2
|
* Core: Always enable ptrcall, remove PTRCALL_ENABLED defineRémi Verschelde2020-11-251-198/+24
| | | | | | | ptrcall is now also used to optimize calls in GDScript, on top of the existing use by the GDNative and Mono modules. It no longer makes sense to make it optional.
* Remove empty lines around braces with the formatting scriptAaron Franke2020-11-161-1/+0
|
* Make sure operators appear in the docs tooreduz2020-11-091-2/+2
| | | | | Add "operator" and "constructor" qualifiers to make it easier to see in the docs.
* Variant: Rename Type::_RID to Type::RIDRémi Verschelde2020-11-091-6/+6
| | | | | | | | The underscore prefix was used to avoid the conflict between the `RID` class name and the matching enum value in `Variant::Type`. This can be fixed differently by prefixing uses of the `RID` class in `Variant` with the scope resolution operator, as done already for `AABB`.
* Refactored variant constructor logicreduz2020-11-091-9/+64
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-0/+2135
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code