Skip to content

Commit

Permalink
'The vector', 'This vector', 'A vector'
Browse files Browse the repository at this point in the history
- Using 'this vector' to describe the vector on which the method
performs actions (self).

- Using 'the vector' to describe a vector that is returned (from linear
interpolation between 2 vectors).

- Using 'a vector' to describe a vector in the arguments of a method, or
a hypothetical vector.
  • Loading branch information
EthanHermsey committed Apr 5, 2020
1 parent 69b3d2a commit 21efe0b
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 33 deletions.
25 changes: 15 additions & 10 deletions docs/api/en/math/Vector2.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ <h2>Constructor</h2>

<h3>[name]( [param:Float x], [param:Float y] )</h3>
<p>
[page:Float x] - the x value of the vector. Default is *0*.<br />
[page:Float y] - the y value of the vector. Default is *0*.<br /><br />
[page:Float x] - the x value of this vector. Default is *0*.<br />
[page:Float y] - the y value of this vector. Default is *0*.<br /><br />

Creates a new [name].
</p>
Expand Down Expand Up @@ -99,7 +99,7 @@ <h3>[method:this applyMatrix3]( [param:Matrix3 m] )</h3>

<h3>[method:this ceil]()</h3>
<p>
The [page:.x x] and [page:.y y] components of the vector are rounded up to the nearest integer value.
The [page:.x x] and [page:.y y] components of this vector are rounded up to the nearest integer value.
</p>

<h3>[method:this clamp]( [param:Vector2 min], [param:Vector2 max] )</h3>
Expand Down Expand Up @@ -180,7 +180,7 @@ <h3>[method:Boolean equals]( [param:Vector2 v] )</h3>
<p>Checks for strict equality of this vector and [page:Vector2 v].</p>

<h3>[method:this floor]()</h3>
<p>The components of the vector are rounded down to the nearest integer value.</p>
<p>The components of this vector are rounded down to the nearest integer value.</p>

<h3>[method:this fromArray]( [param:Array array], [param:Integer offset] )</h3>
<p>
Expand Down Expand Up @@ -247,7 +247,7 @@ <h3>[method:this negate]()</h3>

<h3>[method:this normalize]()</h3>
<p>
Converts this vector to a [link:https://en.wikipedia.org/wiki/Unit_vector unit vector] - that is, sets it equal to the vector with the same direction
Converts this vector to a [link:https://en.wikipedia.org/wiki/Unit_vector unit vector] - that is, sets it equal to a vector with the same direction
as this one, but [page:.length length] 1.
</p>

Expand Down Expand Up @@ -275,15 +275,15 @@ <h3>[method:this rotateAround]( [param:Vector2 center], [param:float angle] )</h
[page:Vector2 center] - the point around which to rotate.<br />
[page:float angle] - the angle to rotate, in radians.<br /><br />

Rotates the vector around [page:Vector2 center] by [page:float angle] radians.
Rotates this vector around [page:Vector2 center] by [page:float angle] radians.
</p>

<h3>[method:this round]()</h3>
<p>The components of the vector are rounded to the nearest integer value.</p>
<p>The components of this vector are rounded to the nearest integer value.</p>

<h3>[method:this roundToZero]()</h3>
<p>
The components of the vector are rounded towards zero (up if negative, down if positive) to an integer value.
The components of this vector are rounded towards zero (up if negative, down if positive) to an integer value.
</p>

<h3>[method:this set]( [param:Float x], [param:Float y] )</h3>
Expand All @@ -300,7 +300,7 @@ <h3>[method:null setComponent]( [param:Integer index], [param:Float value] )</h3

<h3>[method:this setLength]( [param:Float l] )</h3>
<p>
Sets this vector to the vector with the same direction as this one, but [page:.length length]
Sets this vector to a vector with the same direction as this one, but [page:.length length]
[page:Float l].
</p>

Expand All @@ -326,12 +326,17 @@ <h3>[method:this subVectors]( [param:Vector2 a], [param:Vector2 b] )</h3>

<h3>[method:Array toArray]( [param:Array array], [param:Integer offset] )</h3>
<p>
[page:Array array] - (optional) array to store the vector to. If this is not provided, a new array will be created.<br />
[page:Array array] - (optional) array to store this vector to. If this is not provided, a new array will be created.<br />
[page:Integer offset] - (optional) optional offset into the array.<br /><br />

Returns an array [x, y], or copies x and y into the provided [page:Array array].
</p>

<h3>[method:this random]()</h3>
<p>
Sets the x and y components of this vector to a random value [0-1].
</p>

<h2>Source</h2>

<p>
Expand Down
26 changes: 15 additions & 11 deletions docs/api/en/math/Vector3.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ <h2>Constructor</h2>

<h3>[name]( [param:Float x], [param:Float y], [param:Float z] )</h3>
<p>
[page:Float x] - the x value of the vector. Default is *0*.<br />
[page:Float y] - the y value of the vector. Default is *0*.<br />
[page:Float z] - the z value of the vector. Default is *0*.<br /><br />
[page:Float x] - the x value of this vector. Default is *0*.<br />
[page:Float y] - the y value of this vector. Default is *0*.<br />
[page:Float z] - the z value of this vector. Default is *0*.<br /><br />

Creates a new [name].
</p>
Expand Down Expand Up @@ -122,7 +122,7 @@ <h3>[method:Float angleTo]( [param:Vector3 v] )</h3>

<h3>[method:this ceil]()</h3>
<p>
The [page:.x x], [page:.y y] and [page:.z z] components of the vector are rounded up to the nearest integer value.
The [page:.x x], [page:.y y] and [page:.z z] components of this vector are rounded up to the nearest integer value.
</p>

<h3>[method:this clamp]( [param:Vector3 min], [param:Vector3 max] )</h3>
Expand Down Expand Up @@ -207,7 +207,7 @@ <h3>[method:Boolean equals]( [param:Vector3 v] )</h3>
<p>Checks for strict equality of this vector and [page:Vector3 v].</p>

<h3>[method:this floor]()</h3>
<p>The components of the vector are rounded down to the nearest integer value.</p>
<p>The components of this vector are rounded down to the nearest integer value.</p>

<h3>[method:this fromArray]( [param:Array array], [param:Integer offset] )</h3>
<p>
Expand Down Expand Up @@ -297,7 +297,7 @@ <h3>[method:this negate]()</h3>

<h3>[method:this normalize]()</h3>
<p>
Convert this vector to a [link:https://en.wikipedia.org/wiki/Unit_vector unit vector] - that is, sets it equal to the vector with the same direction
Convert this vector to a [link:https://en.wikipedia.org/wiki/Unit_vector unit vector] - that is, sets it equal to a vector with the same direction
as this one, but [page:.length length] 1.
</p>

Expand All @@ -323,16 +323,16 @@ <h3>[method:this reflect]( [param:Vector3 normal] )</h3>
<p>
[page:Vector3 normal] - the normal to the reflecting plane<br /><br />

Reflect the vector off of plane orthogonal to [page:Vector3 normal]. Normal is assumed to
Reflect this vector off of plane orthogonal to [page:Vector3 normal]. Normal is assumed to
have unit length.
</p>

<h3>[method:this round]()</h3>
<p>The components of the vector are rounded to the nearest integer value.</p>
<p>The components of this vector are rounded to the nearest integer value.</p>

<h3>[method:this roundToZero]()</h3>
<p>
The components of the vector are rounded towards zero (up if negative, down if positive) to an integer value.
The components of this vector are rounded towards zero (up if negative, down if positive) to an integer value.
</p>

<h3>[method:this set]( [param:Float x], [param:Float y], [param:Float z] )</h3>
Expand Down Expand Up @@ -388,7 +388,7 @@ <h3>[method:this setFromSphericalCoords]( [param:Float radius], [param:Float phi

<h3>[method:this setLength]( [param:Float l] )</h3>
<p>
Set this vector to the vector with the same direction as this one, but [page:.length length]
Set this vector to a vector with the same direction as this one, but [page:.length length]
[page:Float l].
</p>

Expand Down Expand Up @@ -417,7 +417,7 @@ <h3>[method:this subVectors]( [param:Vector3 a], [param:Vector3 b] )</h3>

<h3>[method:Array toArray]( [param:Array array], [param:Integer offset] )</h3>
<p>
[page:Array array] - (optional) array to store the vector to. If this is not provided
[page:Array array] - (optional) array to store this vector to. If this is not provided
a new array will be created.<br />
[page:Integer offset] - (optional) optional offset into the array.<br /><br />

Expand All @@ -437,6 +437,10 @@ <h3>[method:this unproject]( [param:Camera camera] )</h3>
Projects this vector from the camera's normalized device coordinate (NDC) space into world space.
</p>

<h3>[method:this random]()</h3>
<p>
Sets the x, y and z components of this vector to a random value [0-1].
</p>

<h2>Source</h2>

Expand Down
27 changes: 16 additions & 11 deletions docs/api/en/math/Vector4.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ <h2>Constructor</h2>

<h3>[name]( [param:Float x], [param:Float y], [param:Float z], [param:Float w] )</h3>
<p>
[page:Float x] - the x value of the vector. Default is *0*.<br />
[page:Float y] - the y value of the vector. Default is *0*.<br />
[page:Float z] - the z value of the vector. Default is *0*.<br />
[page:Float w] - the w value of the vector. Default is *1*.<br /><br />
[page:Float x] - the x value of this vector. Default is *0*.<br />
[page:Float y] - the y value of this vector. Default is *0*.<br />
[page:Float z] - the z value of this vector. Default is *0*.<br />
[page:Float w] - the w value of this vector. Default is *1*.<br /><br />

Creates a new [name].
</p>
Expand Down Expand Up @@ -99,7 +99,7 @@ <h3>[method:this applyMatrix4]( [param:Matrix4 m] )</h3>

<h3>[method:this ceil]()</h3>
<p>
The [page:.x x], [page:.y y], [page:.z z] and [page:.w w] components of the vector are rounded up to the nearest integer value.
The [page:.x x], [page:.y y], [page:.z z] and [page:.w w] components of this vector are rounded up to the nearest integer value.
</p>

<h3>[method:this clamp]( [param:Vector4 min], [param:Vector4 max] )</h3>
Expand Down Expand Up @@ -156,7 +156,7 @@ <h3>[method:Boolean equals]( [param:Vector4 v] )</h3>
<p>Checks for strict equality of this vector and [page:Vector4 v].</p>

<h3>[method:this floor]()</h3>
<p>The components of the vector are rounded down to the nearest integer value.</p>
<p>The components of this vector are rounded down to the nearest integer value.</p>

<h3>[method:this fromArray]( [param:Array array], [param:Integer offset] )</h3>
<p>
Expand Down Expand Up @@ -226,7 +226,7 @@ <h3>[method:this negate]()</h3>

<h3>[method:this normalize]()</h3>
<p>
Converts this vector to a [link:https://en.wikipedia.org/wiki/Unit_vector unit vector] - that is, sets it equal to the vector with the same direction
Converts this vector to a [link:https://en.wikipedia.org/wiki/Unit_vector unit vector] - that is, sets it equal to a vector with the same direction
as this one, but [page:.length length] 1.
</p>

Expand All @@ -246,11 +246,11 @@ <h3>[method:this multiplyScalar]( [param:Float s] )</h3>
<p>Multiplies this vector by scalar [page:Float s].</p>

<h3>[method:this round]()</h3>
<p>The components of the vector are rounded to the nearest integer value.</p>
<p>The components of this vector are rounded to the nearest integer value.</p>

<h3>[method:this roundToZero]()</h3>
<p>
The components of the vector are rounded towards zero (up if negative, down if positive) to an integer value.
The components of this vector are rounded towards zero (up if negative, down if positive) to an integer value.
</p>

<h3>[method:this set]( [param:Float x], [param:Float y], [param:Float z], [param:Float w] )</h3>
Expand Down Expand Up @@ -285,7 +285,7 @@ <h3>[method:null setComponent]( [param:Integer index], [param:Float value] )</h3

<h3>[method:this setLength]( [param:Float l] )</h3>
<p>
Sets this vector to the vector with the same direction as this one, but [page:.length length]
Sets this vector to a vector with the same direction as this one, but [page:.length length]
[page:Float l].
</p>

Expand Down Expand Up @@ -317,12 +317,17 @@ <h3>[method:this subVectors]( [param:Vector4 a], [param:Vector4 b] )</h3>

<h3>[method:Array toArray]( [param:Array array], [param:Integer offset] )</h3>
<p>
[page:Array array] - (optional) array to store the vector to. If this is not provided, a new array will be created.<br />
[page:Array array] - (optional) array to store this vector to. If this is not provided, a new array will be created.<br />
[page:Integer offset] - (optional) optional offset into the array.<br /><br />

Returns an array [x, y, z, w], or copies x, y, z and w into the provided [page:Array array].
</p>

<h3>[method:this random]()</h3>
<p>
Sets the x, y, z and w components of this vector to a random value [0-1].
</p>

<h2>Source</h2>

<p>
Expand Down
5 changes: 5 additions & 0 deletions docs/api/zh/math/Vector2.html
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@ <h3>[method:Array toArray]( [param:Array array], [param:Integer offset] )</h3>
返回一个数组[x, y],或者将x和y复制到所传入的[page:Array array]中。
</p>

<h3>[method:this random]()</h3>
<p>
Sets the x and y components of this vector to a random value [0-1].
</p>

<h2>源代码</h2>

<p>
Expand Down
6 changes: 5 additions & 1 deletion docs/api/zh/math/Vector3.html
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ <h3>[method:this reflect]( [param:Vector3 normal] )</h3>
<p>
[page:Vector3 normal] - the normal to the reflecting plane<br /><br />

Reflect the vector off of plane orthogonal to [page:Vector3 normal]. Normal is assumed to
Reflect this vector off of plane orthogonal to [page:Vector3 normal]. Normal is assumed to
have unit length.
</p>

Expand Down Expand Up @@ -426,6 +426,10 @@ <h3>[method:this unproject]( [param:Camera camera] )</h3>
Projects this vector from the camera's normalized device coordinate (NDC) space into world space.
</p>

<h3>[method:this random]()</h3>
<p>
Sets the x, y and z components of this vector to a random value [0-1].
</p>

<h2>源代码</h2>

Expand Down
5 changes: 5 additions & 0 deletions docs/api/zh/math/Vector4.html
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ <h3>[method:Array toArray]( [param:Array array], [param:Integer offset] )</h3>
返回一个数组[x, y, z, w],或者将x、y、z和w复制到所传入的[page:Array array]中。
</p>

<h3>[method:this random]()</h3>
<p>
Sets the x, y, z and w components of this vector to a random value [0-1].
</p>

<h2>源代码</h2>

<p>
Expand Down

0 comments on commit 21efe0b

Please sign in to comment.