Skip to content

Commit a10b8f7

Browse files
committed
Documentation: Added Vector2.clampLength and Vector3.clampLength
1 parent 43dcad2 commit a10b8f7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

docs/api/math/Vector2.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@ <h3>[method:Vector2 clampScalar]([page:Float min], [page:Float max]) [page:Vecto
171171
If this vector's x or y values are less than the min value, they are replaced by the min value.
172172
</div>
173173

174+
<h3>[method:Vector2 clampLength]([page:Float min], [page:Float max]) [page:Vector2 this]</h3>
175+
<div>
176+
min -- [page:Float] the minimum value the length will be clamped to <br />
177+
max -- [page:Float] the maximum value the length will be clamped to
178+
</div>
179+
<div>
180+
If this vector's length is greater than the max value, it is replaced by the max value. <br /><br />
181+
If this vector's length is less than the min value, it is replaced by the min value.
182+
</div>
183+
174184
<h3>[method:Vector2 floor]()</h3>
175185
<div>
176186
The components of the vector are rounded downwards (towards negative infinity) to an integer value.

docs/api/math/Vector3.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,16 @@ <h3>[method:Vector3 clampScalar]([page:Float min], [page:Float max]) [page:Vecto
206206
If this vector's x, y or z values are less than the min value, they are replaced by the min value.
207207
</div>
208208

209+
<h3>[method:Vector3 clampLength]([page:Float min], [page:Float max]) [page:Vector3 this]</h3>
210+
<div>
211+
min -- [page:Float] the minimum value the length will be clamped to <br />
212+
max -- [page:Float] the maximum value the length will be clamped to
213+
</div>
214+
<div>
215+
If this vector's length is greater than the max value, it is replaced by the max value. <br /><br />
216+
If this vector's length is less than the min value, it is replaced by the min value.
217+
</div>
218+
209219
<h3>[method:Vector3 floor]()</h3>
210220
<div>
211221
The components of the vector are rounded downwards (towards negative infinity) to an integer value.

0 commit comments

Comments
 (0)