mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 19:29:06 +00:00
Fix some typos and grammar mistakes found using LanguageTool
This commit is contained in:
@@ -9,7 +9,7 @@ The basic idea is that you want to transition from A to B. A value ``t``, repres
|
||||
|
||||
As an example if ``t`` is 0, then the state is A. If ``t`` is 1, then the state is B. Anything in-between is an *interpolation*.
|
||||
|
||||
Between two real (floating point) numbers, a simple interpolation is usually described as:
|
||||
Between two real (floating-point) numbers, a simple interpolation is usually described as:
|
||||
|
||||
.. tabs::
|
||||
.. code-tab:: gdscript GDScript
|
||||
|
||||
@@ -583,7 +583,7 @@ How does it all work in 3D?
|
||||
|
||||
One of the great things about transformation matrices is that they
|
||||
work very similarly between 2D and 3D transformations.
|
||||
All of the code and formulas used above for 2D work the same in 3D,
|
||||
All the code and formulas used above for 2D work the same in 3D,
|
||||
with 3 exceptions: the addition of a third axis, that each
|
||||
axis is of type :ref:`class_Vector3`, and also that Godot stores
|
||||
the :ref:`class_Basis` separately from the :ref:`class_Transform`,
|
||||
@@ -625,7 +625,7 @@ how you represent rotation by itself without the basis vectors.
|
||||
With 2D, we have an easy way (atan2) to switch between a transformation
|
||||
matrix and an angle. In 3D, we can't simply represent rotation as one
|
||||
number. There is something called Euler angles, which can represent
|
||||
rotations as a set of 3 numbers, however they are limited and not very
|
||||
rotations as a set of 3 numbers, however, they are limited and not very
|
||||
useful, except for trivial cases.
|
||||
|
||||
In 3D we do not typically use angles, we either use a transformation basis
|
||||
|
||||
@@ -180,23 +180,21 @@ degrees to either side:
|
||||
.. tabs::
|
||||
.. code-tab:: gdscript GDScript
|
||||
|
||||
# calculate vector from a to b
|
||||
# Calculate vector from `a` to `b`.
|
||||
var dvec = (point_b - point_a).normalized()
|
||||
# rotate 90 degrees
|
||||
# Rotate 90 degrees.
|
||||
var normal = Vector2(dvec.y, -dvec.x)
|
||||
# or alternatively
|
||||
# Alternatively (depending the desired side of the normal):
|
||||
# var normal = Vector2(-dvec.y, dvec.x)
|
||||
# depending the desired side of the normal
|
||||
|
||||
.. code-tab:: csharp
|
||||
|
||||
// calculate vector from a to b
|
||||
// Calculate vector from `a` to `b`.
|
||||
var dvec = (pointB - pointA).Normalized();
|
||||
// rotate 90 degrees
|
||||
// Rotate 90 degrees.
|
||||
var normal = new Vector2(dvec.y, -dvec.x);
|
||||
// or alternatively
|
||||
// Alternatively (depending the desired side of the normal):
|
||||
// var normal = new Vector2(-dvec.y, dvec.x);
|
||||
// depending the desired side of the normal
|
||||
|
||||
The rest is the same as the previous example, either point_a or
|
||||
point_b will work since they are in the same plane:
|
||||
|
||||
Reference in New Issue
Block a user