File: func_common.sb

package info (click to toggle)
python-pyglm 2.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,008 kB
  • sloc: cpp: 53,029; python: 3,683; makefile: 7
file content (385 lines) | stat: -rw-r--r-- 27,405 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
\c\This file was generated using a tool\c\
\h1\func_common methods\h1\
The following methods are all part of the \b\func_common methods\b\.
It contains common GLSL functions.
\h2\Table of contents\h2\
\ul\
\-\\url #abs-function\\b\abs\b\ function\url\
\-\\url #ceil-function\\b\ceil\b\ function\url\
\-\\url #clamp-function\\b\clamp\b\ function\url\
\-\\url #floatbitstoint-function\\b\floatBitsToInt\b\ function\url\
\-\\url #floatbitstouint-function\\b\floatBitsToUint\b\ function\url\
\-\\url #floor-function\\b\floor\b\ function\url\
\-\\url #fma-function\\b\fma\b\ function\url\
\-\\url #fmax-function\\b\fmax\b\ function\url\
\-\\url #fmin-function\\b\fmin\b\ function\url\
\-\\url #fract-function\\b\fract\b\ function\url\
\-\\url #frexp-function\\b\frexp\b\ function\url\
\-\\url #intbitstofloat-function\\b\intBitsToFloat\b\ function\url\
\-\\url #isinf-function\\b\isinf\b\ function\url\
\-\\url #isnan-function\\b\isnan\b\ function\url\
\-\\url #ldexp-function\\b\ldexp\b\ function\url\
\-\\url #max-function\\b\max\b\ function\url\
\-\\url #min-function\\b\min\b\ function\url\
\-\\url #mix-function\\b\mix\b\ function\url\
\-\\url #mod-function\\b\mod\b\ function\url\
\-\\url #modf-function\\b\modf\b\ function\url\
\-\\url #round-function\\b\round\b\ function\url\
\-\\url #roundeven-function\\b\roundEven\b\ function\url\
\-\\url #sign-function\\b\sign\b\ function\url\
\-\\url #smoothstep-function\\b\smoothstep\b\ function\url\
\-\\url #step-function\\b\step\b\ function\url\
\-\\url #trunc-function\\b\trunc\b\ function\url\
\-\\url #uintbitstofloat-function\\b\uintBitsToFloat\b\ function\url\
\ul\
\h3\abs() function\h3\
\raw\#### <code>glm.<code>**abs**(**x**: *float*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\x\code\ if \code\x >= 0\code\; otherwise it returns \code\-x\code\.

\raw\#### <code>glm.<code>**abs**(**x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For each component \code\c\code\ of \code\x\code\,
\raw\&emsp;&emsp;\raw\Returns \code\c\code\ if \code\c >= 0\code\; otherwise it returns \code\-c\code\.

\h3\ceil() function\h3\
\raw\#### <code>glm.<code>**ceil**(**x**: *float*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer that is greater than or equal to \code\x\code\.

\raw\#### <code>glm.<code>**ceil**(**x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For each component \code\c\code\ of \code\x\code\,
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer that is greater than or equal to \code\c\code\.

\h3\clamp() function\h3\
\raw\#### <code>glm.<code>**clamp**(**x**: *number*, **minVal**: *number*, **maxVal**: *number*) -\\> *number*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\min(max(x, minVal), maxVal)\code\.

\raw\#### <code>glm.<code>**clamp**(**x**: *vecN*, **minVal**: *number*, **maxVal**: *number*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\min(max(x, minVal), maxVal)\code\ for each component in \code\x\code\ using the floating-point values
\raw\&emsp;&emsp;\raw\\code\minVal\code\ and \code\maxVal\code\.

\raw\#### <code>glm.<code>**clamp**(**x**: *vecN*, **minVal**: *vecN*, **maxVal**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\min(max(x, minVal), maxVal)\code\ for each component in \code\x\code\ using the floating-point values
\raw\&emsp;&emsp;\raw\\code\minVal\code\ and \code\maxVal\code\.

\h3\floatBitsToInt() function\h3\
\raw\#### <code>glm.<code>**floatBitsToInt**(**v**: *float*) -\\> *int*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a signed integer value representing the encoding of a floating-point value.
\raw\&emsp;&emsp;\raw\The floating-point value's bit-level representation is preserved.

\raw\#### <code>glm.<code>**floatBitsToInt**(**v**: *fvecN*) -\\> *ivecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a signed integer value representing the encoding of a floating-point value.
\raw\&emsp;&emsp;\raw\The floating-point value's bit-level representation is preserved.

\h3\floatBitsToUint() function\h3\
\raw\#### <code>glm.<code>**floatBitsToUint**(**v**: *float*) -\\> *int*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns an unsigned integer value representing the encoding of a floating-point value.
\raw\&emsp;&emsp;\raw\The floating-point value's bit-level representation is preserved.

\raw\#### <code>glm.<code>**floatBitsToUint**(**v**: *fvecN*) -\\> *uvecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns an unsigned integer value representing the encoding of a floating-point value.
\raw\&emsp;&emsp;\raw\The floating-point value's bit-level representation is preserved.

\h3\floor() function\h3\
\raw\#### <code>glm.<code>**floor**(**x**: *float*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer that is less then or equal to \code\x\code\.

\raw\#### <code>glm.<code>**floor**(**v**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For each component \code\c\code\ of \code\v\code\:
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer that is less then or equal to \code\c\code\.

\h3\fma() function\h3\
\raw\#### <code>glm.<code>**fma**(**a**: *float*, **b**: *float*, **c**: *float*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Computes and returns \code\a * b + c\code\.

\h3\fmax() function\h3\
\raw\#### <code>glm.<code>**fmax**(**x**: *number*, **y**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\x < y\code\; otherwise, it returns \code\x\code\. If one of the two arguments is \code\NaN\code\, the value
\raw\&emsp;&emsp;\raw\of the other argument is returned.

\raw\#### <code>glm.<code>**fmax**(**x**: *vecN*, **y**: *number*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For each component \code\c\code\ of \code\x\code\:
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\c < y\code\; otherwise, it returns \code\c\code\. If one of the two arguments is \code\NaN\code\, the value
\raw\&emsp;&emsp;\raw\of the other argument is returned.

\raw\#### <code>glm.<code>**fmax**(**x**: *vecN*, **y**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For every index \code\i\code\:
\raw\&emsp;&emsp;\raw\Returns \code\y[i]\code\ if \code\x[i] < y[i]\code\; otherwise, it returns \code\x[i]\code\. If one of the two arguments is
\raw\&emsp;&emsp;\raw\\code\NaN\code\, the value of the other argument is returned.

\raw\#### <code>glm.<code>**fmax**(**a**: *vecN*, **b**: *vecN*, **c**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\fmax(fmax(a, b), c)\code\.

\raw\#### <code>glm.<code>**fmax**(**a**: *vecN*, **b**: *vecN*, **c**: *vecN*, **d**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\fmax(fmax(a, b), fmax(c, d))\code\.

\h3\fmin() function\h3\
\raw\#### <code>glm.<code>**fmin**(**x**: *number*, **y**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\y < x\code\; otherwise, it returns \code\x\code\. If one of the two arguments is \code\NaN\code\, the value
\raw\&emsp;&emsp;\raw\of the other argument is returned.

\raw\#### <code>glm.<code>**fmin**(**x**: *vecN*, **y**: *number*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For each component \code\c\code\ of \code\x\code\:
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\y < c\code\; otherwise, it returns \code\c\code\. If one of the two arguments is \code\NaN\code\, the value
\raw\&emsp;&emsp;\raw\of the other argument is returned.

\raw\#### <code>glm.<code>**fmin**(**x**: *vecN*, **y**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For every index \code\i\code\:
\raw\&emsp;&emsp;\raw\Returns \code\y[i]\code\ if \code\y[i] < x[i]\code\; otherwise, it returns \code\x[i]\code\. If one of the two arguments is
\raw\&emsp;&emsp;\raw\\code\NaN\code\, the value of the other argument is returned.

\raw\#### <code>glm.<code>**fmin**(**a**: *vecN*, **b**: *vecN*, **c **: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\fmin(fmin(a, b), c)\code\.

\raw\#### <code>glm.<code>**fmin**(**a**: *vecN*, **b**: *vecN*, **c **: *vecN*, **d**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\fmin(fmin(a, b), fmin(c, d))\code\.

\h3\fract() function\h3\
\raw\#### <code>glm.<code>**fract**(**x**: *float*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\x - floor(x)\code\.

\raw\#### <code>glm.<code>**fract**(**c**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\x - floor(x)\code\.

\h3\frexp() function\h3\
\raw\#### <code>glm.<code>**frexp**(**x**: *float*) -\\> *(significant: float, exponent: int)*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Splits \code\x\code\ into a floating-point significand in the range \code\[0.5, 1.0)\code\ and an integral exponent
\raw\&emsp;&emsp;\raw\of two, such that: \code\x = significand * exp(2, exponent)\code\

\raw\#### <code>glm.<code>**frexp**(**x**: *vecN*, **exp**: *ivecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Splits \code\x\code\ into a floating-point significand in the range \code\[0.5, 1.0)\code\ and an integral exponent
\raw\&emsp;&emsp;\raw\of two, such that: \code\x = significand * exp(2, exponent)\code\
\raw\&emsp;&emsp;\raw\The significand is returned by the function and the exponent is returned in the parameter
\raw\&emsp;&emsp;\raw\\code\exp\code\. For a floating-point value of zero, the significantand exponent are both zero. For a
\raw\&emsp;&emsp;\raw\floating-point value that is an infinity or is not a number, the results are undefined.

\h3\intBitsToFloat() function\h3\
\raw\#### <code>glm.<code>**intBitsToFloat**(**v**: *int*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a floating-point value corresponding to a signed integer encoding of a floating-point
\raw\&emsp;&emsp;\raw\value. If an \code\inf\code\ or \code\NaN\code\ is passed in, it will not signal, and the resulting floating point
\raw\&emsp;&emsp;\raw\value is unspecified. Otherwise, the bit-level representation is preserved.

\raw\#### <code>glm.<code>**intBitsToFloat**(**v**: *ivecN*) -\\> *fvecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a floating-point value corresponding to a signed integer encoding of a floating-point
\raw\&emsp;&emsp;\raw\value. If an \code\inf\code\ or \code\NaN\code\ is passed in, it will not signal, and the resulting floating point
\raw\&emsp;&emsp;\raw\value is unspecified. Otherwise, the bit-level representation is preserved.

\h3\isinf() function\h3\
\raw\#### <code>glm.<code>**isinf**(**x**: *float*) -\\> *bool*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\True\code\ if \code\x\code\ holds a positive infinity or negative infinity representation in the
\raw\&emsp;&emsp;\raw\underlying implementation's set of floating point representations.
\raw\&emsp;&emsp;\raw\Returns \code\False\code\ otherwise, including for implementations with no infinity representations.

\raw\#### <code>glm.<code>**isinf**(**x**: *vecN*) -\\> *bvecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\True\code\ if \code\x\code\ holds a positive infinity or negative infinity representation in the
\raw\&emsp;&emsp;\raw\underlying implementation's set of floating point representations.
\raw\&emsp;&emsp;\raw\Returns \code\False\code\ otherwise, including for implementations with no infinity representations.

\raw\#### <code>glm.<code>**isinf**(**x**: *quat*) -\\> *bvecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\True\code\ if \code\x\code\ holds a positive infinity or negative infinity representation in the
\raw\&emsp;&emsp;\raw\underlying implementation's set of floating point representations.
\raw\&emsp;&emsp;\raw\Returns \code\False\code\ otherwise, including for implementations with no infinity representations.

\h3\isnan() function\h3\
\raw\#### <code>glm.<code>**isnan**(**x**: *float*) -\\> *bool*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\True\code\ if \code\x\code\ holds a \code\NaN\code\ (not a number) representation in the underlying
\raw\&emsp;&emsp;\raw\implementation's set of floating point representations.
\raw\&emsp;&emsp;\raw\Returns \code\False\code\ otherwise, including for implementations with no \code\NaN\code\ representations.

\raw\#### <code>glm.<code>**isnan**(**x**: *vecN*) -\\> *bvecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\True\code\ if \code\x\code\ holds a \code\NaN\code\ (not a number) representation in the underlying
\raw\&emsp;&emsp;\raw\implementation's set of floating point representations.
\raw\&emsp;&emsp;\raw\Returns \code\False\code\ otherwise, including for implementations with no \code\NaN\code\ representations.

\raw\#### <code>glm.<code>**isnan**(**x**: *quat*) -\\> *bvecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\True\code\ if \code\x\code\ holds a \code\NaN\code\ (not a number) representation in the underlying
\raw\&emsp;&emsp;\raw\implementation's set of floating point representations.
\raw\&emsp;&emsp;\raw\Returns \code\False\code\ otherwise, including for implementations with no \code\NaN\code\ representations.

\h3\ldexp() function\h3\
\raw\#### <code>glm.<code>**ldexp**(**x**: *number*, **exp**: *int*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Builds a floating-point number from \code\x\code\ and the corresponding integral exponent of two in
\raw\&emsp;&emsp;\raw\\code\exp\code\, returning: \code\significand * exp(2, exponent)\code\. If this product is too large to be
\raw\&emsp;&emsp;\raw\represented in the floating-point type, the result is undefined.

\raw\#### <code>glm.<code>**ldexp**(**x**: *vecN*, **exp**: *ivecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Builds a floating-point number from \code\x\code\ and the corresponding integral exponent of two in
\raw\&emsp;&emsp;\raw\\code\exp\code\, returning: \code\significand * exp(2, exponent)\code\. If this product is too large to be
\raw\&emsp;&emsp;\raw\represented in the floating-point type, the result is undefined.

\h3\max() function\h3\
\raw\#### <code>glm.<code>**max**(**x**: *number*, **y**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\x < y\code\; otherwise, it returns \code\x\code\.

\raw\#### <code>glm.<code>**max**(**x**: *vecN*, **y**: *number*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\x < y\code\; otherwise, it returns \code\x\code\.

\raw\#### <code>glm.<code>**max**(**x**: *vecN*, **y**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\x < y\code\; otherwise, it returns \code\x\code\.

\raw\#### <code>glm.<code>**max**(**a**: *number*, **b**: *number*, **c**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the maximum value of 3 inputs.

\raw\#### <code>glm.<code>**max**(**a**: *vecN*, **b**: *vecN*, **c**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the maximum component wise value of 3 inputs.

\raw\#### <code>glm.<code>**max**(**a**: *number*, **b**: *number*, **c**: *number*, **d**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the maximum value of 4 inputs.

\raw\#### <code>glm.<code>**max**(**a**: *vecN*, **b**: *vecN*, **c**: *vecN*, **d**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the maximum component wise value of 4 inputs.

\raw\#### <code>glm.<code>**max**(**iterable**) -\\> *any*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the greatest number or the maximum component wise value respectively.

\h3\min() function\h3\
\raw\#### <code>glm.<code>**min**(**x**: *number*, **y**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\y < x\code\; otherwise, it returns \code\x\code\.

\raw\#### <code>glm.<code>**min**(**x**: *vecN*, **y**: *number*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\y < x\code\; otherwise, it returns \code\x\code\.

\raw\#### <code>glm.<code>**min**(**x**: *vecN*, **y**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\y < x\code\; otherwise, it returns \code\x\code\.

\raw\#### <code>glm.<code>**min**(**a**: *number*, **b**: *number*, **c**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the minimum value of 3 inputs.

\raw\#### <code>glm.<code>**min**(**a**: *vecN*, **b**: *vecN*, **c**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the minimum component wise value of 3 inputs.

\raw\#### <code>glm.<code>**min**(**a**: *number*, **b**: *number*, **c**: *number*, **d**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the minimum value of 4 inputs.

\raw\#### <code>glm.<code>**min**(**a**: *vecN*, **b**: *vecN*, **c**: *vecN*, **d**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the minimum component wise value of 4 inputs.

\raw\#### <code>glm.<code>**min**(**iterable**) -\\> *any*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the smallest number or the minimum component wise value respectively.

\h3\mix() function\h3\
\raw\#### <code>glm.<code>**mix**(**x**: *number*, **y**: *number*, **a**: *float*) -\\> *number*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\x * (1.0 - a) + y * a\code\, i.e., the linear blend of \code\x\code\ and \code\y\code\ using the floating-point
\raw\&emsp;&emsp;\raw\value \code\a\code\. The value for \code\a\code\ is not restricted to the range \code\[0, 1]\code\.

\raw\#### <code>glm.<code>**mix**(**x**: *number*, **y**: *number*, **a**: *bool*) -\\> *number*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\y\code\ if \code\a\code\ is \code\True\code\ and \code\x\code\ otherwise.

\raw\#### <code>glm.<code>**mix**(**x**: *vecN*, **y**: *vecN*, **a**: *fvecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\x * (1.0 - a) + y * a\code\, i.e., the linear blend of \code\x\code\ and \code\y\code\ using the floating-point
\raw\&emsp;&emsp;\raw\value \code\a\code\. The value for \code\a\code\ is not restricted to the range \code\[0, 1]\code\.

\raw\#### <code>glm.<code>**mix**(**x**: *vecN*, **y**: *vecN*, **a**: *bvecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For each component index \code\i\code\:
\raw\&emsp;&emsp;\raw\Returns \code\y[i]\code\ if \code\a[i]\code\ is \code\True\code\ and \code\x[i]\code\ otherwise.

\raw\#### <code>glm.<code>**mix**(**x**: *matNxM*, **y**: *matNxM*, **a**: *fmatNxM*) -\\> *matNxM*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\x * (1.0 - a) + y * a\code\, i.e., the linear blend of \code\x\code\ and \code\y\code\ using the floating-point
\raw\&emsp;&emsp;\raw\value \code\a\code\ for each component. The value for \code\a\code\ is not restricted to the range \code\[0, 1]\code\.

\raw\#### <code>glm.<code>**mix**(**x**: *matNxM*, **y**: *matNxM*, **a**: *float*) -\\> *matNxM*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\x * (1.0 - a) + y * a\code\, i.e., the linear blend of \code\x\code\ and \code\y\code\ using the floating-point
\raw\&emsp;&emsp;\raw\value \code\a\code\ for each component. The value for \code\a\code\ is not restricted to the range \code\[0, 1]\code\.

\raw\#### <code>glm.<code>**mix**(**x**: *quat*, **y**: *quat*, **a**: *float*) -\\> *quat*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Spherical linear interpolation of two quaternions. The interpolation is oriented and the
\raw\&emsp;&emsp;\raw\rotation is performed at constant speed. For short path spherical linear interpolation, use
\raw\&emsp;&emsp;\raw\the \code\slerp\code\ function.

\h3\mod() function\h3\
\raw\#### <code>glm.<code>**mod**(**a**, **b**) -\\> *Any*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Equivalent to \code\a % b\code\.

\h3\modf() function\h3\
\raw\#### <code>glm.<code>**modf**(**x**: *float*) -\\> *(fraction, integer)*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the fractional part of \code\x\code\ and the integer part (as a whole number floating point value).

\raw\#### <code>glm.<code>**modf**(**x**: *vecN*, **i**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns the fractional part of \code\x\code\ and sets \code\i\code\ to the integer part (as a whole number floating
\raw\&emsp;&emsp;\raw\point value).

\h3\round() function\h3\
\raw\#### <code>glm.<code>**round**(**x**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer to \code\x\code\. The fraction \code\0.5\code\ will round in a
\raw\&emsp;&emsp;\raw\direction chosen by the implementation, presumably the direction that is fastest. This
\raw\&emsp;&emsp;\raw\includes the possibility that \code\round(x)\code\ returns the same value as \code\roundEven(x)\code\

\raw\#### <code>glm.<code>**round**(**x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer to \code\x\code\. The fraction \code\0.5\code\ will round in a
\raw\&emsp;&emsp;\raw\direction chosen by the implementation, presumably the direction that is fastest. This
\raw\&emsp;&emsp;\raw\includes the possibility that \code\round(x)\code\ returns the same value as \code\roundEven(x)\code\ for all
\raw\&emsp;&emsp;\raw\values of \code\x\code\.

\h3\roundEven() function\h3\
\raw\#### <code>glm.<code>**roundEven**(**x**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer to \code\x\code\. A fractional part of \code\0.5\code\ will round
\raw\&emsp;&emsp;\raw\toward the nearest even integer. (Both \code\3.5\code\ and \code\4.5\code\ for \code\x\code\ will return \code\4.0\code\.)

\raw\#### <code>glm.<code>**roundEven**(**x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer to \code\x\code\. A fractional part of \code\0.5\code\ will round
\raw\&emsp;&emsp;\raw\toward the nearest even integer. (Both \code\3.5\code\ and \code\4.5\code\ for \code\x\code\ will return \code\4.0\code\.)

\h3\sign() function\h3\
\raw\#### <code>glm.<code>**sign**(**x**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\1.0\code\ if \code\x > 0\code\, \code\0.0\code\ if \code\x == 0\code\, or \code\-1.0\code\ if \code\x < 0\code\.

\raw\#### <code>glm.<code>**sign**(**x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For every component \code\c\code\ of \code\x\code\:
\raw\&emsp;&emsp;\raw\Returns \code\1.0\code\ if \code\x > 0\code\, \code\0.0\code\ if \code\x == 0\code\, or \code\-1.0\code\ if \code\x < 0\code\.

\h3\smoothstep() function\h3\
\raw\#### <code>glm.<code>**smoothstep**(**edge0**: *number*, **edge1**: *number*, **x**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\0.0\code\ if \code\x <= edge0\code\ and \code\1.0\code\ if \code\x >= edge1\code\ and performs smooth Hermite interpolation
\raw\&emsp;&emsp;\raw\between \code\0\code\ and \code\1\code\ when \code\edge0 < x < edge1\code\. This is useful in cases where you would want a
\raw\&emsp;&emsp;\raw\threshold function with a smooth transition. This is equivalent to :
\raw\&emsp;&emsp;\raw\\code\t = clamp((x - edge0) / (edge1 - edge0), 0, 1)\code\
\raw\&emsp;&emsp;\raw\\code\return t * t * (3 - 2 * t)\code\
\raw\&emsp;&emsp;\raw\Results are undefined if \code\edge0 >= edge1\code\.

\raw\#### <code>glm.<code>**smoothstep**(**edge0**: *number*, **edge1**: *number*, **x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\0.0\code\ if \code\x <= edge0\code\ and \code\1.0\code\ if \code\x >= edge1\code\ and performs smooth Hermite interpolation
\raw\&emsp;&emsp;\raw\between \code\0\code\ and \code\1\code\ when \code\edge0 < x < edge1\code\. This is useful in cases where you would want a
\raw\&emsp;&emsp;\raw\threshold function with a smooth transition. This is equivalent to :
\raw\&emsp;&emsp;\raw\\code\t = clamp((x - edge0) / (edge1 - edge0), 0, 1)\code\
\raw\&emsp;&emsp;\raw\\code\return t * t * (3 - 2 * t)\code\
\raw\&emsp;&emsp;\raw\Results are undefined if \code\edge0 >= edge1\code\.

\raw\#### <code>glm.<code>**smoothstep**(**edge0**: *vecN*, **edge1**: *vecN*, **x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\0.0\code\ if \code\x <= edge0\code\ and \code\1.0\code\ if \code\x >= edge1\code\ and performs smooth Hermite interpolation
\raw\&emsp;&emsp;\raw\between \code\0\code\ and \code\1\code\ when \code\edge0 < x < edge1\code\. This is useful in cases where you would want a
\raw\&emsp;&emsp;\raw\threshold function with a smooth transition. This is equivalent to :
\raw\&emsp;&emsp;\raw\\code\t = clamp((x - edge0) / (edge1 - edge0), 0, 1)\code\
\raw\&emsp;&emsp;\raw\\code\return t * t * (3 - 2 * t)\code\
\raw\&emsp;&emsp;\raw\Results are undefined if \code\edge0 >= edge1\code\.

\h3\step() function\h3\
\raw\#### <code>glm.<code>**step**(**edge**: *number*, **x**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\0.0\code\ if \code\x < edge\code\, otherwise it returns \code\1.0\code\.

\raw\#### <code>glm.<code>**step**(**edge**: *number*, **x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For every component \code\c\code\ of \code\x\code\:
\raw\&emsp;&emsp;\raw\Returns \code\0.0\code\ if \code\c < edge\code\, otherwise it returns \code\1.0\code\.

\raw\#### <code>glm.<code>**step**(**edge**: *vecN*, **x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For every index \code\i\code\:
\raw\&emsp;&emsp;\raw\Returns \code\0.0\code\ if \code\x[i] < edge[i]\code\, otherwise it returns \code\1.0\code\.

\h3\trunc() function\h3\
\raw\#### <code>glm.<code>**trunc**(**x**: *number*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer to \code\x\code\ whose absolute value is not larger than
\raw\&emsp;&emsp;\raw\the absolute value of \code\x\code\.

\raw\#### <code>glm.<code>**trunc**(**x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For every component \code\c\code\ of \code\x\code\:
\raw\&emsp;&emsp;\raw\Returns a value equal to the nearest integer to \code\c\code\ whose absolute value is not larger than
\raw\&emsp;&emsp;\raw\the absolute value of \code\c\code\.

\h3\uintBitsToFloat() function\h3\
\raw\#### <code>glm.<code>**uintBitsToFloat**(**v**: *int*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a floating-point value corresponding to an unsigned integer encoding of a floating-point
\raw\&emsp;&emsp;\raw\value. If an \code\inf\code\ or \code\NaN\code\ is passed in, it will not signal, and the resulting floating point
\raw\&emsp;&emsp;\raw\value is unspecified. Otherwise, the bit-level representation is preserved.

\raw\#### <code>glm.<code>**uintBitsToFloat**(**v**: *ivecN*) -\\> *fvecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns a floating-point value corresponding to an unsigned integer encoding of a floating-point
\raw\&emsp;&emsp;\raw\value. If an \code\inf\code\ or \code\NaN\code\ is passed in, it will not signal, and the resulting floating point
\raw\&emsp;&emsp;\raw\value is unspecified. Otherwise, the bit-level representation is preserved.