Commit graph

16 commits

Author SHA1 Message Date
K. S. Ernest (iFire) Lee f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
A Thousand Ships 308dbb8c63
[Core] Add scalar versions of Vector* min/max/clamp/snap(ped)
Convenience for a number of cases operating on single values
2024-05-02 10:31:13 +02:00
A Thousand Ships a497a5cb3e
[Core] Codestyle improvements to math types 2024-03-04 18:17:10 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
Silc Renew b217c41d36 Refactor interpolating functions in some classes to use Math class 2022-11-24 20:31:43 +09:00
Haoyu Qiu 5da515773d Add is_finite method for checking built-in types 2022-10-08 13:25:08 +08:00
Aaron Franke 43722dbcbc
Use float literals for float calculations in Color 2022-10-07 11:28:47 -05:00
Aaron Franke fd8bd27657
Remove set_axis and get_axis methods from Vector2/2i/3/3i/4/4i 2022-09-19 15:08:50 -05:00
Aaron Franke 058ac331b0
Minor fixes to Vector4 2022-09-04 20:38:44 -05:00
Jonathan Nicholl 15d057c521 Add is_zero_approx methods to Vector2, 3, and 4 2022-09-02 00:29:50 -04:00
Silc Renew dded7c72c1 Make cubic_interpolate() consider key time in animation 2022-08-19 14:48:37 +09:00
antonWetzel 40a1d6d100 vector4 distance_squared_to and update csharp 2022-08-09 01:59:17 +02:00
Hendrik Brucker 36061c5dca Vector4/Vector4i: Add missing methods, tests and fix change of sign operator 2022-08-07 12:25:05 +02:00
Raul Santos 2e5cf62dee
Fix Vector4::min_axis_index for equal components
The documentation says if all components are equal it must return AXIS_W but it was returning AXIS_X.
2022-08-01 04:50:17 +02:00
kobewi 7006f7d693 Add some missing Vector4 methods 2022-07-26 02:35:42 +02:00
reduz 455c06ecd4 Implement Vector4, Vector4i, Projection
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.
2022-07-23 14:00:01 +02:00