Commit Graph

24 Commits

Author SHA1 Message Date
Ninni Pipping 0e697e102b Add more info on the nature of NAN
(cherry picked from commit 5e3c625e24)
2023-06-16 15:12:59 +02:00
VolTer b118d89eed Overhaul the top sections of the class reference (Core classes)
(cherry picked from commit 04562662d3)
2023-06-16 15:12:10 +02:00
Haoyu Qiu c6297f46fe Unify descriptions of vector methods
* is_equal_approx
* normalize
* length_squared
* posmod
* posmodv

(cherry picked from commit 6cd8e706fa)
2023-04-24 17:03:56 +02:00
Haoyu Qiu 4750b77d2d Fix typos and inconsistencies in classref
* Typo fixes.
* Navigation agent's `velocity_computed` signal is not emitted by
  `set_velocity`, but at the end of that frame if `set_velocity` is
  called.
* Simplify link in navigation agent's `avoidance_enabled` description.
* Unify `navigation_layers` description across `NavigationAgent{2,3}D`.
* Unify `is_normalized()` description across `Vector2`, `Vector3`, and
  `Vector4`

(cherry picked from commit ff97c481d3)
2023-03-27 18:02:28 +02:00
lawnjelly c0e5879b41 Improve Vector2 / 3 / 4 normalized() classref.
Mention that the results will be unreliable with initial vector near zero.

(cherry picked from commit cca01afd82)
2023-03-16 16:46:18 +01:00
Haoyu Qiu c6a704af2c Fix typos and inconsistencies in classref
(cherry picked from commit 57d4272984)
2023-03-16 16:43:31 +01:00
Hugo Locurcio 063637ec77
Rename `float=64` SCons option to `precision=double`
This avoids confusion with the old `bits=64` option and building
for 64-bit CPUs in general.
2022-12-10 16:43:45 +01:00
Rémi Verschelde 4a8b725bc9
Merge pull request #68386 from MewPurPur/snappedi-snappedf
Implement snappedi, snappedf, and Vector[2/3/4]i.snapped
2022-11-24 18:54:49 +01:00
VolTer e26f0906f2 Implement snappedi, snappedf, and Vector[2/3/4]i.snapped 2022-11-19 06:18:55 +01:00
Jonathan Nicholl edfb504efe Document that Vector classes are 32-bit 2022-11-12 15:51:11 -05:00
Haoyu Qiu 5da515773d Add `is_finite` method for checking built-in types 2022-10-08 13:25:08 +08:00
MJacred ed4571ee37 Document Vector4i 2022-09-03 17:06:36 +02: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
Andy Maloney 1f72f48361 [doc] Use "param" instead of "code" to refer to parameters #3 2022-08-09 22:00:19 -04:00
Rémi Verschelde 317ced8204
Merge pull request #64108 from antonWetzel/csharp-update 2022-08-10 00:07:32 +02:00
Andy Maloney 5361585832 [doc] Use "param" instead of "code" to refer to parameters
Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
2022-08-09 10:09:07 -04:00
antonWetzel 40a1d6d100 vector4 distance_squared_to and update csharp 2022-08-09 01:59:17 +02:00
Yuri Sizov c5d7115038 Rename the argument tag to param in XML documentation 2022-08-08 22:34:31 +03:00
Hendrik Brucker 36061c5dca Vector4/Vector4i: Add missing methods, tests and fix change of sign operator 2022-08-07 12:25:05 +02:00
kobewi ee6fd704b5 Fix Vector4 serialization 2022-07-29 12:09:03 +02:00
kobewi d7b30b2327 Add Vector4 documentation 2022-07-26 22:37:05 +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