summaryrefslogtreecommitdiffstats
path: root/core/variant/variant_op.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* 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>
* Assign return value on Variant operator failureaaronp642024-09-191-6/+24
| | | | Variant operators for String formatting and "in" could result in errors, which would return from validated_evaluate without assigning r_ret. This would cause scripts using the return value from these operators to get results from previously run code. Updated to return the original String value in the String formatting case, and false for "in" when an error occurs.
* Revert "Make freed object different than null in comparison operators"Rémi Verschelde2024-07-011-16/+16
| | | | | | | | | | This reverts commit 150b50cfcde95f74419ade2811d963224e96fc98. As discussed with the GDScript team, this has some implications which aren't fully consensual yet, and which we want to revisit. For now we revert to the 4.2 behavior for the 4.3 release, to avoid breaking user expectations.
* Use Core/Scene stringnames consistentlykobewi2024-05-131-1/+0
|
* Enforce template syntax `typename` over `class`Thaddeus Crews2024-03-071-40/+40
|
* Merge pull request #73896 from vnen/object-null-boolean-consistencyYuri Sizov2023-12-161-16/+16
|\ | | | | | | Make freed object different than null in comparison operators
| * Make freed object different than null in comparison operatorsGeorge Marques2023-08-211-16/+16
| | | | | | | | | | | | | | | | | | | | This is so everything is consistent, as a freed object is not equivalent to `null` in general. The booleanization of a freed object still returns `false` to work as an easy check for validity of objects. Similarly, the negation of a freed object returns `true`. Also makes freed objects different from each other (if they are not the same reference).
* | [Core] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-111-2/+2
|/
* Fix typo in modulo error message.Joseph Davies2023-08-011-4/+4
|
* Merge pull request #73540 from mashumafi/fix-typed-array-addRémi Verschelde2023-06-201-0/+5
|\ | | | | Fix: Typed arrays aren't working with +
| * Fix: Typed arrays aren't working with +mashumafi2023-02-221-0/+5
| |
* | Add operator NOT for all Variant typesGeorge Marques2023-03-101-3/+3
|/
* 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-23/+50
|
* Fix suppressed error message on error when using % format stringRindbee2022-12-051-8/+16
| | | | | Before, the valid flag would always be true. On formatting errors, an error message is returned as the result. (No error prompts.)
* Implement Vector4, Vector4i, Projectionreduz2022-07-231-0/+48
| | | | | | | | | | | | | 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/+18
|
* Merge pull request #55939 from cdemirer/validated-array-add-fixRémi Verschelde2022-01-171-0/+1
|\ | | | | Fix validated version of array addition
| * Fix validated version of array additioncdemirer2022-01-181-0/+1
| |
* | 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-3/+25
| | | | | | 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).
* Fix crash when dividing by 0 in Vector2/3iRafał Mikrut2021-08-151-0/+96
|
* Fix 'in' operator to check if an object member existsJulien Nguyen2021-07-011-4/+8
|
* Make some variant internal functions public.reduz2021-06-171-0/+1316
-Make constructors, ops and setget inline functions public -Should help optimizing the GDScript VM