diff --git a/docs/api/en/math/Vector2.html b/docs/api/en/math/Vector2.html index 8a4d09d86d007b..b2e0bfa75992c4 100644 --- a/docs/api/en/math/Vector2.html +++ b/docs/api/en/math/Vector2.html @@ -53,8 +53,8 @@

Constructor

[name]( [param:Float x], [param:Float y] )

- [page:Float x] - the x value of the vector. Default is *0*.
- [page:Float y] - the y value of the vector. Default is *0*.

+ [page:Float x] - the x value of this vector. Default is *0*.
+ [page:Float y] - the y value of this vector. Default is *0*.

Creates a new [name].

@@ -99,7 +99,7 @@

[method:this applyMatrix3]( [param:Matrix3 m] )

[method:this ceil]()

- 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.

[method:this clamp]( [param:Vector2 min], [param:Vector2 max] )

@@ -180,7 +180,7 @@

[method:Boolean equals]( [param:Vector2 v] )

Checks for strict equality of this vector and [page:Vector2 v].

[method:this floor]()

-

The components of the vector are rounded down to the nearest integer value.

+

The components of this vector are rounded down to the nearest integer value.

[method:this fromArray]( [param:Array array], [param:Integer offset] )

@@ -247,7 +247,7 @@

[method:this negate]()

[method:this normalize]()

- 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.

@@ -275,15 +275,15 @@

[method:this rotateAround]( [param:Vector2 center], [param:float angle] ) [page:float angle] - the angle to rotate, in radians.

- Rotates the vector around [page:Vector2 center] by [page:float angle] radians. + Rotates this vector around [page:Vector2 center] by [page:float angle] radians.

[method:this round]()

-

The components of the vector are rounded to the nearest integer value.

+

The components of this vector are rounded to the nearest integer value.

[method:this roundToZero]()

- 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.

[method:this set]( [param:Float x], [param:Float y] )

@@ -300,7 +300,7 @@

[method:null setComponent]( [param:Integer index], [param:Float value] )

[method:this setLength]( [param:Float l] )

- 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].

@@ -326,12 +326,17 @@

[method:this subVectors]( [param:Vector2 a], [param:Vector2 b] )

[method:Array toArray]( [param:Array array], [param:Integer offset] )

- [page:Array array] - (optional) array to store the vector to. If this is not provided, a new array will be created.
+ [page:Array array] - (optional) array to store this vector to. If this is not provided, a new array will be created.
[page:Integer offset] - (optional) optional offset into the array.

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

+

[method:this random]()

+

+ Sets the x and y components of this vector to a random value [0-1]. +

+

Source

diff --git a/docs/api/en/math/Vector3.html b/docs/api/en/math/Vector3.html index 9b10fa851fef56..5deab0876517da 100644 --- a/docs/api/en/math/Vector3.html +++ b/docs/api/en/math/Vector3.html @@ -53,9 +53,9 @@

Constructor

[name]( [param:Float x], [param:Float y], [param:Float z] )

- [page:Float x] - the x value of the vector. Default is *0*.
- [page:Float y] - the y value of the vector. Default is *0*.
- [page:Float z] - the z value of the vector. Default is *0*.

+ [page:Float x] - the x value of this vector. Default is *0*.
+ [page:Float y] - the y value of this vector. Default is *0*.
+ [page:Float z] - the z value of this vector. Default is *0*.

Creates a new [name].

@@ -122,7 +122,7 @@

[method:Float angleTo]( [param:Vector3 v] )

[method:this ceil]()

- 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.

[method:this clamp]( [param:Vector3 min], [param:Vector3 max] )

@@ -207,7 +207,7 @@

[method:Boolean equals]( [param:Vector3 v] )

Checks for strict equality of this vector and [page:Vector3 v].

[method:this floor]()

-

The components of the vector are rounded down to the nearest integer value.

+

The components of this vector are rounded down to the nearest integer value.

[method:this fromArray]( [param:Array array], [param:Integer offset] )

@@ -297,7 +297,7 @@

[method:this negate]()

[method:this normalize]()

- 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.

@@ -323,16 +323,16 @@

[method:this reflect]( [param:Vector3 normal] )

[page:Vector3 normal] - the normal to the reflecting plane

- 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.

[method:this round]()

-

The components of the vector are rounded to the nearest integer value.

+

The components of this vector are rounded to the nearest integer value.

[method:this roundToZero]()

- 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.

[method:this set]( [param:Float x], [param:Float y], [param:Float z] )

@@ -388,7 +388,7 @@

[method:this setFromSphericalCoords]( [param:Float radius], [param:Float phi

[method:this setLength]( [param:Float l] )

- 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].

@@ -417,7 +417,7 @@

[method:this subVectors]( [param:Vector3 a], [param:Vector3 b] )

[method:Array toArray]( [param:Array array], [param:Integer offset] )

- [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.
[page:Integer offset] - (optional) optional offset into the array.

@@ -437,6 +437,10 @@

[method:this unproject]( [param:Camera camera] )

Projects this vector from the camera's normalized device coordinate (NDC) space into world space.

+

[method:this random]()

+

+ Sets the x, y and z components of this vector to a random value [0-1]. +

Source

diff --git a/docs/api/en/math/Vector4.html b/docs/api/en/math/Vector4.html index 93df50b48e993b..3789140d82eb55 100644 --- a/docs/api/en/math/Vector4.html +++ b/docs/api/en/math/Vector4.html @@ -52,10 +52,10 @@

Constructor

[name]( [param:Float x], [param:Float y], [param:Float z], [param:Float w] )

- [page:Float x] - the x value of the vector. Default is *0*.
- [page:Float y] - the y value of the vector. Default is *0*.
- [page:Float z] - the z value of the vector. Default is *0*.
- [page:Float w] - the w value of the vector. Default is *1*.

+ [page:Float x] - the x value of this vector. Default is *0*.
+ [page:Float y] - the y value of this vector. Default is *0*.
+ [page:Float z] - the z value of this vector. Default is *0*.
+ [page:Float w] - the w value of this vector. Default is *1*.

Creates a new [name].

@@ -99,7 +99,7 @@

[method:this applyMatrix4]( [param:Matrix4 m] )

[method:this ceil]()

- 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.

[method:this clamp]( [param:Vector4 min], [param:Vector4 max] )

@@ -156,7 +156,7 @@

[method:Boolean equals]( [param:Vector4 v] )

Checks for strict equality of this vector and [page:Vector4 v].

[method:this floor]()

-

The components of the vector are rounded down to the nearest integer value.

+

The components of this vector are rounded down to the nearest integer value.

[method:this fromArray]( [param:Array array], [param:Integer offset] )

@@ -226,7 +226,7 @@

[method:this negate]()

[method:this normalize]()

- 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.

@@ -246,11 +246,11 @@

[method:this multiplyScalar]( [param:Float s] )

Multiplies this vector by scalar [page:Float s].

[method:this round]()

-

The components of the vector are rounded to the nearest integer value.

+

The components of this vector are rounded to the nearest integer value.

[method:this roundToZero]()

- 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.

[method:this set]( [param:Float x], [param:Float y], [param:Float z], [param:Float w] )

@@ -285,7 +285,7 @@

[method:null setComponent]( [param:Integer index], [param:Float value] )

[method:this setLength]( [param:Float l] )

- 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].

@@ -317,12 +317,17 @@

[method:this subVectors]( [param:Vector4 a], [param:Vector4 b] )

[method:Array toArray]( [param:Array array], [param:Integer offset] )

- [page:Array array] - (optional) array to store the vector to. If this is not provided, a new array will be created.
+ [page:Array array] - (optional) array to store this vector to. If this is not provided, a new array will be created.
[page:Integer offset] - (optional) optional offset into the array.

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

+

[method:this random]()

+

+ Sets the x, y, z and w components of this vector to a random value [0-1]. +

+

Source

diff --git a/docs/api/zh/math/Vector2.html b/docs/api/zh/math/Vector2.html index 9f832d4502389e..a5ee5d62c98f13 100644 --- a/docs/api/zh/math/Vector2.html +++ b/docs/api/zh/math/Vector2.html @@ -333,6 +333,11 @@

[method:Array toArray]( [param:Array array], [param:Integer offset] )

返回一个数组[x, y],或者将x和y复制到所传入的[page:Array array]中。

+

[method:this random]()

+

+ Sets the x and y components of this vector to a random value [0-1]. +

+

源代码

diff --git a/docs/api/zh/math/Vector3.html b/docs/api/zh/math/Vector3.html index 43df0e1dc356a0..011d7eecda7142 100644 --- a/docs/api/zh/math/Vector3.html +++ b/docs/api/zh/math/Vector3.html @@ -318,7 +318,7 @@

[method:this reflect]( [param:Vector3 normal] )

[page:Vector3 normal] - the normal to the reflecting plane

- 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.

@@ -426,6 +426,10 @@

[method:this unproject]( [param:Camera camera] )

Projects this vector from the camera's normalized device coordinate (NDC) space into world space.

+

[method:this random]()

+

+ Sets the x, y and z components of this vector to a random value [0-1]. +

源代码

diff --git a/docs/api/zh/math/Vector4.html b/docs/api/zh/math/Vector4.html index 33e156afbfe0f0..69489a64452e87 100644 --- a/docs/api/zh/math/Vector4.html +++ b/docs/api/zh/math/Vector4.html @@ -322,6 +322,11 @@

[method:Array toArray]( [param:Array array], [param:Integer offset] )

返回一个数组[x, y, z, w],或者将x、y、z和w复制到所传入的[page:Array array]中。

+

[method:this random]()

+

+ Sets the x, y, z and w components of this vector to a random value [0-1]. +

+

源代码