[DOCS] Vector2/Vector3/TileMap wording fixes

(cherry picked from commit 8bc4882dd3)
This commit is contained in:
Chris Bradfield 2018-05-12 17:58:45 -07:00 committed by Hein-Pieter van Braam
parent 0b3b3de2cd
commit c7b141d20a
3 changed files with 67 additions and 62 deletions

View File

@ -16,7 +16,7 @@
<return type="void">
</return>
<description>
Clear all cells.
Clears all cells.
</description>
</method>
<method name="get_cell" qualifiers="const">
@ -27,7 +27,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
Return the tile index of the referenced cell.
Returns the tile index of the given cell.
</description>
</method>
<method name="get_cellv" qualifiers="const">
@ -36,7 +36,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
Return the tile index of the cell referenced by a Vector2.
Returns the tile index of the cell given by a Vector2.
</description>
</method>
<method name="get_collision_layer_bit" qualifiers="const">
@ -45,6 +45,7 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
Returns [code]true[/code] if the given collision layer bit is set.
</description>
</method>
<method name="get_collision_mask_bit" qualifiers="const">
@ -53,13 +54,14 @@
<argument index="0" name="bit" type="int">
</argument>
<description>
Returns [code]true[/code] if the given collision mask bit is set.
</description>
</method>
<method name="get_used_cells" qualifiers="const">
<return type="Array">
</return>
<description>
Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1).
Returns an array of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]).
</description>
</method>
<method name="get_used_cells_by_id" qualifiers="const">
@ -68,12 +70,14 @@
<argument index="0" name="id" type="int">
</argument>
<description>
Returns an array of all cells with the given tile id.
</description>
</method>
<method name="get_used_rect">
<return type="Rect2">
</return>
<description>
Returns a rectangle enclosing the used (non-empty) tiles of the map.
</description>
</method>
<method name="is_cell_transposed" qualifiers="const">
@ -84,7 +88,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector).
Returns [code]true[/code] if the given cell is transposed, i.e. the x and y axes are swapped.
</description>
</method>
<method name="is_cell_x_flipped" qualifiers="const">
@ -95,7 +99,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
Return whether the referenced cell is flipped over the X axis.
Returns [code]true[/code] if the given cell is flipped in the x axis.
</description>
</method>
<method name="is_cell_y_flipped" qualifiers="const">
@ -106,7 +110,7 @@
<argument index="1" name="y" type="int">
</argument>
<description>
Return whether the referenced cell is flipped over the Y axis.
Returns [code]true[/code] if the given cell is flipped in the y axis.
</description>
</method>
<method name="map_to_world" qualifiers="const">
@ -117,8 +121,8 @@
<argument index="1" name="ignore_half_ofs" type="bool" default="false">
</argument>
<description>
Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument.
Optionally, the tilemap's potential half offset can be ignored.
Returns the global position corresponding to the given tilemap (grid-based) coordinates.
Optionally, the tilemap's half offset can be ignored.
</description>
</method>
<method name="set_cell">
@ -139,9 +143,9 @@
<argument index="6" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Set the tile index for the cell referenced by its grid-based X and Y coordinates.
A tile index of -1 clears the cell.
Optionally, the tile can also be flipped over the X and Y coordinates, transposed, or be given autotile coordinates.
Sets the tile index for the cell given by a Vector2.
An index of [code]-1[/code] clears the cell.
Optionally, the tile can also be flipped, transposed, or given autotile coordinates.
</description>
</method>
<method name="set_cellv">
@ -158,9 +162,9 @@
<argument index="4" name="transpose" type="bool" default="false">
</argument>
<description>
Set the tile index for the cell referenced by a Vector2 of grid-based coordinates.
A tile index of -1 clears the cell.
Optionally, the tile can also be flipped over the X and Y axes or transposed.
Sets the tile index for the given cell.
An index of [code]-1[/code] clears the cell.
Optionally, the tile can also be flipped or transposed.
</description>
</method>
<method name="set_collision_layer_bit">
@ -171,7 +175,7 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
Set any collision layer to be [code]true[/code] or [code]false[/code].
Sets the given collision layer bit.
</description>
</method>
<method name="set_collision_mask_bit">
@ -182,6 +186,7 @@
<argument index="1" name="value" type="bool">
</argument>
<description>
Sets the given collision mask bit.
</description>
</method>
<method name="update_bitmask_area">
@ -190,7 +195,7 @@
<argument index="0" name="position" type="Vector2">
</argument>
<description>
Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates.
Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based x and y coordinates.
</description>
</method>
<method name="update_bitmask_region">
@ -201,8 +206,8 @@
<argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates).
Calling with invalid (or missing) parameters applies autotiling rules for the entire TileMap.
Applies autotiling rules to the cells in the given region (specified by grid-based x and y coordinates).
Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap.
</description>
</method>
<method name="world_to_map" qualifiers="const">
@ -211,7 +216,7 @@
<argument index="0" name="world_position" type="Vector2">
</argument>
<description>
Return the tilemap (grid-based) coordinates corresponding to the absolute world position given as an argument.
Returns the tilemap (grid-based) coordinatescorresponding to the given global position.
</description>
</method>
</methods>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Vector2" category="Built-In Types" version="3.0.2">
<brief_description>
Vector used for 2D Math.
Vector used for 2D math.
</brief_description>
<description>
2-element structure that can be used to represent positions in 2d-space, or any other pair of numeric values.
2-element structure that can be used to represent positions in 2d space or any other pair of numeric values.
</description>
<tutorials>
http://docs.godotengine.org/en/3.0/tutorials/math/index.html
@ -34,8 +34,8 @@
<return type="float">
</return>
<description>
Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)).
Be aware that it therefore returns an angle oriented clockwise with regard to the (0, 1) unit vector, and not an angle oriented counter-clockwise with regard to the (1, 0) unit vector (which would be the typical trigonometric representation of the angle when calling Math::atan2(y,x)).
Returns the vector's angle in radians with respect to the x-axis, or [code](1, 0)[/code] vector.
Equivalent to the result of atan2 when called with the vector's x and y as parameters: [code]atan2(x, y)[/code].
</description>
</method>
<method name="angle_to">
@ -60,7 +60,7 @@
<return type="float">
</return>
<description>
Returns the ratio of X to Y.
Returns the ratio of x to y.
</description>
</method>
<method name="bounce">
@ -69,7 +69,7 @@
<argument index="0" name="n" type="Vector2">
</argument>
<description>
Bounce returns the vector "bounced off" from the given plane, specified by its normal vector.
Returns the vector "bounced off" from a plane defined by the given normal.
</description>
</method>
<method name="clamped">
@ -93,7 +93,7 @@
<argument index="3" name="t" type="float">
</argument>
<description>
Cubicly interpolates between this Vector and "b", using "pre_a" and "post_b" as handles, and returning the result at position "t". "t" should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
Cubicly interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], or a percentage of how far along the interpolation is.
</description>
</method>
<method name="distance_squared_to">
@ -102,7 +102,7 @@
<argument index="0" name="to" type="Vector2">
</argument>
<description>
Returns the squared distance to vector "b". Prefer this function over "distance_to" if you need to sort vectors or need the squared distance for some formula.
Returns the squared distance to vector [code]b[/code]. Prefer this function over [method distance_to] if you need to sort vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to">
@ -111,7 +111,7 @@
<argument index="0" name="to" type="Vector2">
</argument>
<description>
Returns the distance to vector "b".
Returns the distance to vector [code]b[/code].
</description>
</method>
<method name="dot">
@ -120,7 +120,7 @@
<argument index="0" name="with" type="Vector2">
</argument>
<description>
Returns the dot product with vector "b".
Returns the dot product with vector [code]b[/code].
</description>
</method>
<method name="floor">
@ -134,21 +134,21 @@
<return type="bool">
</return>
<description>
Returns whether the vector is normalized or not.
Returns [code]true[/code] if the vector is normalized.
</description>
</method>
<method name="length">
<return type="float">
</return>
<description>
Returns the length of the vector.
Returns the vector's length.
</description>
</method>
<method name="length_squared">
<return type="float">
</return>
<description>
Returns the squared length of the vector. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
Returns the vector's length squared. Prefer this function over [member length] if you need to sort vectors or need the squared length for some formula.
</description>
</method>
<method name="linear_interpolate">
@ -159,14 +159,14 @@
<argument index="1" name="t" type="float">
</argument>
<description>
Returns the result of the linear interpolation between this vector and "b", by amount "t". "t" should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], a percentage of how far along the interpolation is.
</description>
</method>
<method name="normalized">
<return type="Vector2">
</return>
<description>
Returns a normalized vector to unit length.
Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
</description>
</method>
<method name="reflect">
@ -175,7 +175,7 @@
<argument index="0" name="n" type="Vector2">
</argument>
<description>
Reflects the vector along the given plane, specified by its normal vector.
Returns the vector reflected from a plane defined by the given normal.
</description>
</method>
<method name="rotated">
@ -184,7 +184,7 @@
<argument index="0" name="phi" type="float">
</argument>
<description>
Rotates the vector by "phi" radians.
Returns the vector rotated by [code]phi[/code] radians.
</description>
</method>
<method name="slide">
@ -193,7 +193,7 @@
<argument index="0" name="n" type="Vector2">
</argument>
<description>
Slide returns the component of the vector along the given plane, specified by its normal vector.
Returns the component of the vector along a plane defined by the given normal.
</description>
</method>
<method name="snapped">
@ -202,7 +202,7 @@
<argument index="0" name="by" type="Vector2">
</argument>
<description>
Snaps the vector to a grid with the given size.
Returns the vector snapped to a grid with the given size.
</description>
</method>
<method name="tangent">
@ -215,10 +215,10 @@
</methods>
<members>
<member name="x" type="float" setter="" getter="">
X component of the vector.
The vector's x component.
</member>
<member name="y" type="float" setter="" getter="">
Y component of the vector.
The vector's y component.
</member>
</members>
<constants>

View File

@ -38,7 +38,7 @@
<argument index="0" name="to" type="Vector3">
</argument>
<description>
Returns the vector's minimum angle to the vector [code]to[/code].
Returns the minimum angle to the given vector.
</description>
</method>
<method name="bounce">
@ -47,7 +47,7 @@
<argument index="0" name="n" type="Vector3">
</argument>
<description>
Bounce returns the vector "bounced off" from the given plane, specified by its normal vector.
Returns the vector "bounced off" from a plane defined by the given normal.
</description>
</method>
<method name="ceil">
@ -87,7 +87,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
Returns the squared distance to [code]b[/code]. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula.
Returns the squared distance to [code]b[/code]. Prefer this function over [method distance_to] if you need to sort vectors or need the squared distance for some formula.
</description>
</method>
<method name="distance_to">
@ -96,7 +96,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
Returns the distance to b.
Returns the distance to [code]b[/code].
</description>
</method>
<method name="dot">
@ -105,7 +105,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
Returns the dot product with b.
Returns the dot product with [code]b[/code].
</description>
</method>
<method name="floor">
@ -119,28 +119,28 @@
<return type="Vector3">
</return>
<description>
Returns the inverse of the vector. This is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )
Returns the inverse of the vector. This is the same as [code]Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z )[/code].
</description>
</method>
<method name="is_normalized">
<return type="bool">
</return>
<description>
Returns whether the vector is normalized or not.
Returns [code]true[/code] if the vector is normalized.
</description>
</method>
<method name="length">
<return type="float">
</return>
<description>
Returns the length of the vector.
Returns the vector's length.
</description>
</method>
<method name="length_squared">
<return type="float">
</return>
<description>
Returns the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula.
Returns the vector's length squared. Prefer this function over [method length] if you need to sort vectors or need the squared length for some formula.
</description>
</method>
<method name="linear_interpolate">
@ -151,28 +151,28 @@
<argument index="1" name="t" type="float">
</argument>
<description>
Linearly interpolates the vector to a given one (b), by the given amount (t). (t) should be a float of 0.0-1.0, a percentage of how far along the interpolation is.
Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], a percentage of how far along the interpolation is.
</description>
</method>
<method name="max_axis">
<return type="int">
</return>
<description>
Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the largest.
Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants.
</description>
</method>
<method name="min_axis">
<return type="int">
</return>
<description>
Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest.
Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants.
</description>
</method>
<method name="normalized">
<return type="Vector3">
</return>
<description>
Returns a copy of the normalized vector to unit length. This is the same as v / v.length().
Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
</description>
</method>
<method name="outer">
@ -181,7 +181,7 @@
<argument index="0" name="b" type="Vector3">
</argument>
<description>
Returns the outer product with b.
Returns the outer product with [code]b[/code].
</description>
</method>
<method name="reflect">
@ -190,7 +190,7 @@
<argument index="0" name="n" type="Vector3">
</argument>
<description>
Reflects the vector along the given plane, specified by its normal vector.
Returns the vector reflected from a plane defined by the given normal.
</description>
</method>
<method name="rotated">
@ -201,7 +201,7 @@
<argument index="1" name="phi" type="float">
</argument>
<description>
Rotates the vector around some axis by phi radians. The axis must be a normalized vector.
Rotates the vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector.
</description>
</method>
<method name="slide">
@ -210,7 +210,7 @@
<argument index="0" name="n" type="Vector3">
</argument>
<description>
Slide returns the component of the vector along the given plane, specified by its normal vector.
Returns the component of the vector along a plane defined by the given normal.
</description>
</method>
<method name="snapped">
@ -232,18 +232,18 @@
</methods>
<members>
<member name="x" type="float" setter="" getter="">
X component of the vector.
The vector's x component.
</member>
<member name="y" type="float" setter="" getter="">
Y component of the vector.
The vector's y component.
</member>
<member name="z" type="float" setter="" getter="">
Z component of the vector.
The vector's z component.
</member>
</members>
<constants>
<constant name="AXIS_X" value="0">
Enumerated value for the X axis. Returned by functions like max_axis or min_axis.
Enumerated value for the X axis. Returned by [method max_axis] and [method min_axis].
</constant>
<constant name="AXIS_Y" value="1">
Enumerated value for the Y axis.