[DOCS] Vector2/Vector3/TileMap wording fixes

This commit is contained in:
Chris Bradfield 2018-05-12 17:58:45 -07:00
parent a0ea57b72c
commit 8bc4882dd3
3 changed files with 69 additions and 64 deletions

View File

@ -16,14 +16,14 @@
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Clear all cells. Clears all cells.
</description> </description>
</method> </method>
<method name="fix_invalid_tiles"> <method name="fix_invalid_tiles">
<return type="void"> <return type="void">
</return> </return>
<description> <description>
Clear cells that does not exist in the tileset. Clears cells that do not exist in the tileset.
</description> </description>
</method> </method>
<method name="get_cell" qualifiers="const"> <method name="get_cell" qualifiers="const">
@ -34,7 +34,7 @@
<argument index="1" name="y" type="int"> <argument index="1" name="y" type="int">
</argument> </argument>
<description> <description>
Return the tile index of the referenced cell. Returns the tile index of the given cell.
</description> </description>
</method> </method>
<method name="get_cellv" qualifiers="const"> <method name="get_cellv" qualifiers="const">
@ -43,7 +43,7 @@
<argument index="0" name="position" type="Vector2"> <argument index="0" name="position" type="Vector2">
</argument> </argument>
<description> <description>
Return the tile index of the cell referenced by a Vector2. Returns the tile index of the cell given by a Vector2.
</description> </description>
</method> </method>
<method name="get_collision_layer_bit" qualifiers="const"> <method name="get_collision_layer_bit" qualifiers="const">
@ -52,6 +52,7 @@
<argument index="0" name="bit" type="int"> <argument index="0" name="bit" type="int">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the given collision layer bit is set.
</description> </description>
</method> </method>
<method name="get_collision_mask_bit" qualifiers="const"> <method name="get_collision_mask_bit" qualifiers="const">
@ -60,13 +61,14 @@
<argument index="0" name="bit" type="int"> <argument index="0" name="bit" type="int">
</argument> </argument>
<description> <description>
Returns [code]true[/code] if the given collision mask bit is set.
</description> </description>
</method> </method>
<method name="get_used_cells" qualifiers="const"> <method name="get_used_cells" qualifiers="const">
<return type="Array"> <return type="Array">
</return> </return>
<description> <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> </description>
</method> </method>
<method name="get_used_cells_by_id" qualifiers="const"> <method name="get_used_cells_by_id" qualifiers="const">
@ -75,12 +77,14 @@
<argument index="0" name="id" type="int"> <argument index="0" name="id" type="int">
</argument> </argument>
<description> <description>
Returns an array of all cells with the given tile id.
</description> </description>
</method> </method>
<method name="get_used_rect"> <method name="get_used_rect">
<return type="Rect2"> <return type="Rect2">
</return> </return>
<description> <description>
Returns a rectangle enclosing the used (non-empty) tiles of the map.
</description> </description>
</method> </method>
<method name="is_cell_transposed" qualifiers="const"> <method name="is_cell_transposed" qualifiers="const">
@ -91,7 +95,7 @@
<argument index="1" name="y" type="int"> <argument index="1" name="y" type="int">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="is_cell_x_flipped" qualifiers="const"> <method name="is_cell_x_flipped" qualifiers="const">
@ -102,7 +106,7 @@
<argument index="1" name="y" type="int"> <argument index="1" name="y" type="int">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="is_cell_y_flipped" qualifiers="const"> <method name="is_cell_y_flipped" qualifiers="const">
@ -113,7 +117,7 @@
<argument index="1" name="y" type="int"> <argument index="1" name="y" type="int">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="map_to_world" qualifiers="const"> <method name="map_to_world" qualifiers="const">
@ -124,8 +128,8 @@
<argument index="1" name="ignore_half_ofs" type="bool" default="false"> <argument index="1" name="ignore_half_ofs" type="bool" default="false">
</argument> </argument>
<description> <description>
Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument. Returns the global position corresponding to the given tilemap (grid-based) coordinates.
Optionally, the tilemap's potential half offset can be ignored. Optionally, the tilemap's half offset can be ignored.
</description> </description>
</method> </method>
<method name="set_cell"> <method name="set_cell">
@ -146,9 +150,9 @@
<argument index="6" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )"> <argument index="6" name="autotile_coord" type="Vector2" default="Vector2( 0, 0 )">
</argument> </argument>
<description> <description>
Set the tile index for the cell referenced by its grid-based X and Y coordinates. Sets the tile index for the cell given by a Vector2.
A tile index of -1 clears the cell. An index of [code]-1[/code] clears the cell.
Optionally, the tile can also be flipped over the X and Y coordinates, transposed, or be given autotile coordinates. Optionally, the tile can also be flipped, transposed, or given autotile coordinates.
</description> </description>
</method> </method>
<method name="set_cellv"> <method name="set_cellv">
@ -165,9 +169,9 @@
<argument index="4" name="transpose" type="bool" default="false"> <argument index="4" name="transpose" type="bool" default="false">
</argument> </argument>
<description> <description>
Set the tile index for the cell referenced by a Vector2 of grid-based coordinates. Sets the tile index for the given cell.
A tile index of -1 clears the cell. An index of [code]-1[/code] clears the cell.
Optionally, the tile can also be flipped over the X and Y axes or transposed. Optionally, the tile can also be flipped or transposed.
</description> </description>
</method> </method>
<method name="set_collision_layer_bit"> <method name="set_collision_layer_bit">
@ -178,7 +182,7 @@
<argument index="1" name="value" type="bool"> <argument index="1" name="value" type="bool">
</argument> </argument>
<description> <description>
Set any collision layer to be [code]true[/code] or [code]false[/code]. Sets the given collision layer bit.
</description> </description>
</method> </method>
<method name="set_collision_mask_bit"> <method name="set_collision_mask_bit">
@ -189,6 +193,7 @@
<argument index="1" name="value" type="bool"> <argument index="1" name="value" type="bool">
</argument> </argument>
<description> <description>
Sets the given collision mask bit.
</description> </description>
</method> </method>
<method name="update_bitmask_area"> <method name="update_bitmask_area">
@ -197,7 +202,7 @@
<argument index="0" name="position" type="Vector2"> <argument index="0" name="position" type="Vector2">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="update_bitmask_region"> <method name="update_bitmask_region">
@ -208,8 +213,8 @@
<argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )"> <argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )">
</argument> </argument>
<description> <description>
Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates). 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. Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap.
</description> </description>
</method> </method>
<method name="world_to_map" qualifiers="const"> <method name="world_to_map" qualifiers="const">
@ -218,7 +223,7 @@
<argument index="0" name="world_position" type="Vector2"> <argument index="0" name="world_position" type="Vector2">
</argument> </argument>
<description> <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> </description>
</method> </method>
</methods> </methods>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<class name="Vector2" category="Built-In Types" version="3.1"> <class name="Vector2" category="Built-In Types" version="3.1">
<brief_description> <brief_description>
Vector used for 2D Math. Vector used for 2D math.
</brief_description> </brief_description>
<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> </description>
<tutorials> <tutorials>
http://docs.godotengine.org/en/3.0/tutorials/math/index.html http://docs.godotengine.org/en/3.0/tutorials/math/index.html
@ -34,8 +34,8 @@
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Returns the result of atan2 when called with the Vector's x and y as parameters (Math::atan2(x,y)). Returns the vector's angle in radians with respect to the x-axis, or [code](1, 0)[/code] vector.
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)). Equivalent to the result of atan2 when called with the vector's x and y as parameters: [code]atan2(x, y)[/code].
</description> </description>
</method> </method>
<method name="angle_to"> <method name="angle_to">
@ -60,7 +60,7 @@
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Returns the ratio of X to Y. Returns the ratio of x to y.
</description> </description>
</method> </method>
<method name="bounce"> <method name="bounce">
@ -69,7 +69,7 @@
<argument index="0" name="n" type="Vector2"> <argument index="0" name="n" type="Vector2">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="ceil"> <method name="ceil">
@ -93,7 +93,7 @@
<argument index="0" name="with" type="Vector2"> <argument index="0" name="with" type="Vector2">
</argument> </argument>
<description> <description>
Returns the 2-dimensional analog of the cross product with the given Vector2. Returns the 2 dimensional analog of the cross product with the given vector.
</description> </description>
</method> </method>
<method name="cubic_interpolate"> <method name="cubic_interpolate">
@ -108,7 +108,7 @@
<argument index="3" name="t" type="float"> <argument index="3" name="t" type="float">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="distance_squared_to"> <method name="distance_squared_to">
@ -117,7 +117,7 @@
<argument index="0" name="to" type="Vector2"> <argument index="0" name="to" type="Vector2">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="distance_to"> <method name="distance_to">
@ -126,7 +126,7 @@
<argument index="0" name="to" type="Vector2"> <argument index="0" name="to" type="Vector2">
</argument> </argument>
<description> <description>
Returns the distance to vector "b". Returns the distance to vector [code]b[/code].
</description> </description>
</method> </method>
<method name="dot"> <method name="dot">
@ -135,7 +135,7 @@
<argument index="0" name="with" type="Vector2"> <argument index="0" name="with" type="Vector2">
</argument> </argument>
<description> <description>
Returns the dot product with vector "b". Returns the dot product with vector [code]b[/code].
</description> </description>
</method> </method>
<method name="floor"> <method name="floor">
@ -149,21 +149,21 @@
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns whether the vector is normalized or not. Returns [code]true[/code] if the vector is normalized.
</description> </description>
</method> </method>
<method name="length"> <method name="length">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Returns the length of the vector. Returns the vector's length.
</description> </description>
</method> </method>
<method name="length_squared"> <method name="length_squared">
<return type="float"> <return type="float">
</return> </return>
<description> <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> </description>
</method> </method>
<method name="linear_interpolate"> <method name="linear_interpolate">
@ -174,14 +174,14 @@
<argument index="1" name="t" type="float"> <argument index="1" name="t" type="float">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="normalized"> <method name="normalized">
<return type="Vector2"> <return type="Vector2">
</return> </return>
<description> <description>
Returns a normalized vector to unit length. Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code].
</description> </description>
</method> </method>
<method name="reflect"> <method name="reflect">
@ -190,7 +190,7 @@
<argument index="0" name="n" type="Vector2"> <argument index="0" name="n" type="Vector2">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="rotated"> <method name="rotated">
@ -199,7 +199,7 @@
<argument index="0" name="phi" type="float"> <argument index="0" name="phi" type="float">
</argument> </argument>
<description> <description>
Rotates the vector by "phi" radians. Returns the vector rotated by [code]phi[/code] radians.
</description> </description>
</method> </method>
<method name="round"> <method name="round">
@ -214,7 +214,7 @@
<argument index="0" name="n" type="Vector2"> <argument index="0" name="n" type="Vector2">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="snapped"> <method name="snapped">
@ -223,7 +223,7 @@
<argument index="0" name="by" type="Vector2"> <argument index="0" name="by" type="Vector2">
</argument> </argument>
<description> <description>
Snaps the vector to a grid with the given size. Returns the vector snapped to a grid with the given size.
</description> </description>
</method> </method>
<method name="tangent"> <method name="tangent">
@ -236,10 +236,10 @@
</methods> </methods>
<members> <members>
<member name="x" type="float" setter="" getter=""> <member name="x" type="float" setter="" getter="">
X component of the vector. The vector's x component.
</member> </member>
<member name="y" type="float" setter="" getter=""> <member name="y" type="float" setter="" getter="">
Y component of the vector. The vector's y component.
</member> </member>
</members> </members>
<constants> <constants>

View File

@ -38,7 +38,7 @@
<argument index="0" name="to" type="Vector3"> <argument index="0" name="to" type="Vector3">
</argument> </argument>
<description> <description>
Returns the vector's minimum angle to the vector [code]to[/code]. Returns the minimum angle to the given vector.
</description> </description>
</method> </method>
<method name="bounce"> <method name="bounce">
@ -47,7 +47,7 @@
<argument index="0" name="n" type="Vector3"> <argument index="0" name="n" type="Vector3">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="ceil"> <method name="ceil">
@ -87,7 +87,7 @@
<argument index="0" name="b" type="Vector3"> <argument index="0" name="b" type="Vector3">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="distance_to"> <method name="distance_to">
@ -96,7 +96,7 @@
<argument index="0" name="b" type="Vector3"> <argument index="0" name="b" type="Vector3">
</argument> </argument>
<description> <description>
Returns the distance to b. Returns the distance to [code]b[/code].
</description> </description>
</method> </method>
<method name="dot"> <method name="dot">
@ -105,7 +105,7 @@
<argument index="0" name="b" type="Vector3"> <argument index="0" name="b" type="Vector3">
</argument> </argument>
<description> <description>
Returns the dot product with b. Returns the dot product with [code]b[/code].
</description> </description>
</method> </method>
<method name="floor"> <method name="floor">
@ -119,28 +119,28 @@
<return type="Vector3"> <return type="Vector3">
</return> </return>
<description> <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> </description>
</method> </method>
<method name="is_normalized"> <method name="is_normalized">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Returns whether the vector is normalized or not. Returns [code]true[/code] if the vector is normalized.
</description> </description>
</method> </method>
<method name="length"> <method name="length">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Returns the length of the vector. Returns the vector's length.
</description> </description>
</method> </method>
<method name="length_squared"> <method name="length_squared">
<return type="float"> <return type="float">
</return> </return>
<description> <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> </description>
</method> </method>
<method name="linear_interpolate"> <method name="linear_interpolate">
@ -151,28 +151,28 @@
<argument index="1" name="t" type="float"> <argument index="1" name="t" type="float">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="max_axis"> <method name="max_axis">
<return type="int"> <return type="int">
</return> </return>
<description> <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> </description>
</method> </method>
<method name="min_axis"> <method name="min_axis">
<return type="int"> <return type="int">
</return> </return>
<description> <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> </description>
</method> </method>
<method name="normalized"> <method name="normalized">
<return type="Vector3"> <return type="Vector3">
</return> </return>
<description> <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> </description>
</method> </method>
<method name="outer"> <method name="outer">
@ -181,7 +181,7 @@
<argument index="0" name="b" type="Vector3"> <argument index="0" name="b" type="Vector3">
</argument> </argument>
<description> <description>
Returns the outer product with b. Returns the outer product with [code]b[/code].
</description> </description>
</method> </method>
<method name="reflect"> <method name="reflect">
@ -190,7 +190,7 @@
<argument index="0" name="n" type="Vector3"> <argument index="0" name="n" type="Vector3">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="rotated"> <method name="rotated">
@ -201,7 +201,7 @@
<argument index="1" name="phi" type="float"> <argument index="1" name="phi" type="float">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="round"> <method name="round">
@ -216,7 +216,7 @@
<argument index="0" name="n" type="Vector3"> <argument index="0" name="n" type="Vector3">
</argument> </argument>
<description> <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> </description>
</method> </method>
<method name="snapped"> <method name="snapped">
@ -238,18 +238,18 @@
</methods> </methods>
<members> <members>
<member name="x" type="float" setter="" getter=""> <member name="x" type="float" setter="" getter="">
X component of the vector. The vector's x component.
</member> </member>
<member name="y" type="float" setter="" getter=""> <member name="y" type="float" setter="" getter="">
Y component of the vector. The vector's y component.
</member> </member>
<member name="z" type="float" setter="" getter=""> <member name="z" type="float" setter="" getter="">
Z component of the vector. The vector's z component.
</member> </member>
</members> </members>
<constants> <constants>
<constant name="AXIS_X" value="0"> <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>
<constant name="AXIS_Y" value="1"> <constant name="AXIS_Y" value="1">
Enumerated value for the Y axis. Enumerated value for the Y axis.