You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/classes/@GlobalScope.xml
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -696,6 +696,7 @@
696
696
[codeblock]
697
697
max(1, 7, 3, -6, 5) # Returns 7
698
698
[/codeblock]
699
+
[b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise maximum, and will pick the largest value when compared using [code]x < y[/code]. To perform component-wise maximum, use [method Vector2.max], [method Vector2i.max], [method Vector3.max], [method Vector3i.max], [method Vector4.max], and [method Vector4i.max].
699
700
</description>
700
701
</method>
701
702
<methodname="maxf">
@@ -729,6 +730,7 @@
729
730
[codeblock]
730
731
min(1, 7, 3, -6, 5) # Returns -6
731
732
[/codeblock]
733
+
[b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise minimum, and will pick the smallest value when compared using [code]x < y[/code]. To perform component-wise minimum, use [method Vector2.min], [method Vector2i.min], [method Vector3.min], [method Vector3i.min], [method Vector4.min], and [method Vector4i.min].
Copy file name to clipboardExpand all lines: doc/classes/Vector4.xml
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -184,18 +184,46 @@
184
184
Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation.
185
185
</description>
186
186
</method>
187
+
<methodname="max"qualifiers="const">
188
+
<returntype="Vector4" />
189
+
<paramindex="0"name="with"type="Vector4" />
190
+
<description>
191
+
Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4(maxf(x, with.x), maxf(y, with.y), maxf(z, with.z), maxf(w, with.w))[/code].
192
+
</description>
193
+
</method>
187
194
<methodname="max_axis_index"qualifiers="const">
188
195
<returntype="int" />
189
196
<description>
190
197
Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
191
198
</description>
192
199
</method>
200
+
<methodname="maxf"qualifiers="const">
201
+
<returntype="Vector4" />
202
+
<paramindex="0"name="with"type="float" />
203
+
<description>
204
+
Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4(maxf(x, with), maxf(y, with), maxf(z, with), maxf(w, with))[/code].
205
+
</description>
206
+
</method>
207
+
<methodname="min"qualifiers="const">
208
+
<returntype="Vector4" />
209
+
<paramindex="0"name="with"type="Vector4" />
210
+
<description>
211
+
Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4(minf(x, with.x), minf(y, with.y), minf(z, with.z), minf(w, with.w))[/code].
212
+
</description>
213
+
</method>
193
214
<methodname="min_axis_index"qualifiers="const">
194
215
<returntype="int" />
195
216
<description>
196
217
Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W].
197
218
</description>
198
219
</method>
220
+
<methodname="minf"qualifiers="const">
221
+
<returntype="Vector4" />
222
+
<paramindex="0"name="with"type="float" />
223
+
<description>
224
+
Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4(minf(x, with), minf(y, with), minf(z, with), minf(w, with))[/code].
Copy file name to clipboardExpand all lines: doc/classes/Vector4i.xml
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -93,18 +93,46 @@
93
93
This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula.
94
94
</description>
95
95
</method>
96
+
<methodname="max"qualifiers="const">
97
+
<returntype="Vector4i" />
98
+
<paramindex="0"name="with"type="Vector4i" />
99
+
<description>
100
+
Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4i(maxi(x, with.x), maxi(y, with.y), maxi(z, with.z), maxi(w, with.w))[/code].
101
+
</description>
102
+
</method>
96
103
<methodname="max_axis_index"qualifiers="const">
97
104
<returntype="int" />
98
105
<description>
99
106
Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X].
100
107
</description>
101
108
</method>
109
+
<methodname="maxi"qualifiers="const">
110
+
<returntype="Vector4i" />
111
+
<paramindex="0"name="with"type="int" />
112
+
<description>
113
+
Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4i(maxi(x, with), maxi(y, with), maxi(z, with), maxi(w, with))[/code].
114
+
</description>
115
+
</method>
116
+
<methodname="min"qualifiers="const">
117
+
<returntype="Vector4i" />
118
+
<paramindex="0"name="with"type="Vector4i" />
119
+
<description>
120
+
Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4i(mini(x, with.x), mini(y, with.y), mini(z, with.z), mini(w, with.w))[/code].
121
+
</description>
122
+
</method>
102
123
<methodname="min_axis_index"qualifiers="const">
103
124
<returntype="int" />
104
125
<description>
105
126
Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W].
106
127
</description>
107
128
</method>
129
+
<methodname="mini"qualifiers="const">
130
+
<returntype="Vector4i" />
131
+
<paramindex="0"name="with"type="int" />
132
+
<description>
133
+
Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4i(mini(x, with), mini(y, with), mini(z, with), mini(w, with))[/code].
0 commit comments