Sfoglia il codice sorgente

Merge pull request #8372 from Mugen87/dev

Documentation: Added Vector2.clampLength and Vector3.clampLength
Mr.doob 9 anni fa
parent
commit
20ed4ed53c
2 ha cambiato i file con 20 aggiunte e 0 eliminazioni
  1. 10 0
      docs/api/math/Vector2.html
  2. 10 0
      docs/api/math/Vector3.html

+ 10 - 0
docs/api/math/Vector2.html

@@ -171,6 +171,16 @@
 		If this vector's x or y values are less than the min value, they are replaced by the min value.
 		</div>
 
+		<h3>[method:Vector2 clampLength]([page:Float min], [page:Float max]) [page:Vector2 this]</h3>
+		<div>
+		min -- [page:Float] the minimum value the length will be clamped to <br />
+		max -- [page:Float] the maximum value the length will be clamped to
+		</div>
+		<div>
+		If this vector's length is greater than the max value, it is replaced by the max value. <br /><br />
+		If this vector's length is less than the min value, it is replaced by the min value.
+		</div>
+
 		<h3>[method:Vector2 floor]()</h3>
 		<div>
 		The components of the vector are rounded downwards (towards negative infinity) to an integer value.

+ 10 - 0
docs/api/math/Vector3.html

@@ -206,6 +206,16 @@
 		If this vector's x, y or z values are less than the min value, they are replaced by the min value.
 		</div>
 
+		<h3>[method:Vector3 clampLength]([page:Float min], [page:Float max]) [page:Vector3 this]</h3>
+		<div>
+		min -- [page:Float] the minimum value the length will be clamped to <br />
+		max -- [page:Float] the maximum value the length will be clamped to
+		</div>
+		<div>
+		If this vector's length is greater than the max value, it is replaced by the max value. <br /><br />
+		If this vector's length is less than the min value, it is replaced by the min value.
+		</div>
+
 		<h3>[method:Vector3 floor]()</h3>
 		<div>
 		The components of the vector are rounded downwards (towards negative infinity) to an integer value.