mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Update some C# examples
- Rename members that have been renamed in Godot's C# API for 4.0. - Change `delta` parameter type to `double`. - Ensure parameters match base declaration. - Follow our code style more closely. - Other minor code fixes.
This commit is contained in:
@@ -563,21 +563,21 @@ transformations:
|
||||
// The transform is the identity transform.
|
||||
|
||||
Transforming a position by a transform and its inverse results in the
|
||||
same position (same for "xform_inv"):
|
||||
same position:
|
||||
|
||||
.. tabs::
|
||||
.. code-tab:: gdscript GDScript
|
||||
|
||||
var ti = transform.affine_inverse()
|
||||
position = transform.xform(position)
|
||||
position = ti.xform(position)
|
||||
position = transform * position
|
||||
position = ti * position
|
||||
# The position is the same as before.
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
Transform2D ti = Transform.AffineInverse();
|
||||
Position = Transform.Xform(Position);
|
||||
Position = ti.Xform(Position);
|
||||
Position = Transform * Position;
|
||||
Position = ti * Position;
|
||||
// The position is the same as before.
|
||||
|
||||
How does it all work in 3D?
|
||||
|
||||
Reference in New Issue
Block a user