41 #define GLM_VERSION 97
42 #define GLM_VERSION_MAJOR 0
43 #define GLM_VERSION_MINOR 9
44 #define GLM_VERSION_PATCH 7
45 #define GLM_VERSION_REVISION 0
47 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_VERSION_DISPLAYED))
48 # define GLM_MESSAGE_VERSION_DISPLAYED
49 # pragma message ("GLM: version 0.9.7")
55 #define GLM_PLATFORM_UNKNOWN 0x00000000
56 #define GLM_PLATFORM_WINDOWS 0x00010000
57 #define GLM_PLATFORM_LINUX 0x00020000
58 #define GLM_PLATFORM_APPLE 0x00040000
60 #define GLM_PLATFORM_ANDROID 0x00100000
61 #define GLM_PLATFORM_CHROME_NACL 0x00200000
62 #define GLM_PLATFORM_UNIX 0x00400000
63 #define GLM_PLATFORM_QNXNTO 0x00800000
64 #define GLM_PLATFORM_WINCE 0x01000000
66 #ifdef GLM_FORCE_PLATFORM_UNKNOWN
67 # define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
68 #elif defined(__QNXNTO__)
69 # define GLM_PLATFORM GLM_PLATFORM_QNXNTO
70 #elif defined(__APPLE__)
71 # define GLM_PLATFORM GLM_PLATFORM_APPLE
73 # define GLM_PLATFORM GLM_PLATFORM_WINCE
75 # define GLM_PLATFORM GLM_PLATFORM_WINDOWS
76 #elif defined(__native_client__)
77 # define GLM_PLATFORM GLM_PLATFORM_CHROME_NACL
78 #elif defined(__ANDROID__)
79 # define GLM_PLATFORM GLM_PLATFORM_ANDROID
80 #elif defined(__linux)
81 # define GLM_PLATFORM GLM_PLATFORM_LINUX
83 # define GLM_PLATFORM GLM_PLATFORM_UNIX
85 # define GLM_PLATFORM GLM_PLATFORM_UNKNOWN
89 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED))
90 # define GLM_MESSAGE_PLATFORM_DISPLAYED
91 # if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO)
92 # pragma message("GLM: QNX platform detected")
95 # elif(GLM_PLATFORM & GLM_PLATFORM_APPLE)
96 # pragma message("GLM: Apple platform detected")
97 # elif(GLM_PLATFORM & GLM_PLATFORM_WINCE)
98 # pragma message("GLM: WinCE platform detected")
99 # elif(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)
100 # pragma message("GLM: Windows platform detected")
101 # elif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL)
102 # pragma message("GLM: Native Client detected")
103 # elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
104 # pragma message("GLM: Android platform detected")
105 # elif(GLM_PLATFORM & GLM_PLATFORM_LINUX)
106 # pragma message("GLM: Linux platform detected")
107 # elif(GLM_PLATFORM & GLM_PLATFORM_UNIX)
108 # pragma message("GLM: UNIX platform detected")
109 # elif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN)
110 # pragma message("GLM: platform unknown")
112 # pragma message("GLM: platform not detected")
122 #define GLM_COMPILER_UNKNOWN 0x00000000
125 #define GLM_COMPILER_INTEL 0x00100000
126 #define GLM_COMPILER_INTEL12 0x00100010
127 #define GLM_COMPILER_INTEL12_1 0x00100020
128 #define GLM_COMPILER_INTEL13 0x00100030
129 #define GLM_COMPILER_INTEL14 0x00100040
130 #define GLM_COMPILER_INTEL15 0x00100050
131 #define GLM_COMPILER_INTEL16 0x00100060
134 #define GLM_COMPILER_VC 0x01000000
135 #define GLM_COMPILER_VC2010 0x01000090
136 #define GLM_COMPILER_VC2012 0x010000A0
137 #define GLM_COMPILER_VC2013 0x010000B0
138 #define GLM_COMPILER_VC2015 0x010000C0
141 #define GLM_COMPILER_GCC 0x02000000
142 #define GLM_COMPILER_GCC44 0x020000B0
143 #define GLM_COMPILER_GCC45 0x020000C0
144 #define GLM_COMPILER_GCC46 0x020000D0
145 #define GLM_COMPILER_GCC47 0x020000E0
146 #define GLM_COMPILER_GCC48 0x020000F0
147 #define GLM_COMPILER_GCC49 0x02000100
148 #define GLM_COMPILER_GCC50 0x02000200
149 #define GLM_COMPILER_GCC51 0x02000300
150 #define GLM_COMPILER_GCC52 0x02000400
151 #define GLM_COMPILER_GCC53 0x02000500
154 #define GLM_COMPILER_CUDA 0x10000000
155 #define GLM_COMPILER_CUDA40 0x10000040
156 #define GLM_COMPILER_CUDA41 0x10000050
157 #define GLM_COMPILER_CUDA42 0x10000060
158 #define GLM_COMPILER_CUDA50 0x10000070
159 #define GLM_COMPILER_CUDA60 0x10000080
160 #define GLM_COMPILER_CUDA65 0x10000090
161 #define GLM_COMPILER_CUDA70 0x100000A0
162 #define GLM_COMPILER_CUDA75 0x100000B0
165 #define GLM_COMPILER_LLVM 0x20000000
166 #define GLM_COMPILER_LLVM32 0x20000030
167 #define GLM_COMPILER_LLVM33 0x20000040
168 #define GLM_COMPILER_LLVM34 0x20000050
169 #define GLM_COMPILER_LLVM35 0x20000060
170 #define GLM_COMPILER_LLVM36 0x20000070
171 #define GLM_COMPILER_LLVM37 0x20000080
172 #define GLM_COMPILER_LLVM38 0x20000090
173 #define GLM_COMPILER_LLVM39 0x200000A0
176 #define GLM_COMPILER_APPLE_CLANG 0x40000000
177 #define GLM_COMPILER_APPLE_CLANG40 0x40000010
178 #define GLM_COMPILER_APPLE_CLANG41 0x40000020
179 #define GLM_COMPILER_APPLE_CLANG42 0x40000030
180 #define GLM_COMPILER_APPLE_CLANG50 0x40000040
181 #define GLM_COMPILER_APPLE_CLANG51 0x40000050
182 #define GLM_COMPILER_APPLE_CLANG60 0x40000060
183 #define GLM_COMPILER_APPLE_CLANG61 0x40000070
186 #define GLM_MODEL_32 0x00000010
187 #define GLM_MODEL_64 0x00000020
190 #ifdef GLM_FORCE_COMPILER_UNKNOWN
191 # define GLM_COMPILER GLM_COMPILER_UNKNOWN
193 #elif defined(__INTEL_COMPILER)
194 # if __INTEL_COMPILER == 1200
195 # define GLM_COMPILER GLM_COMPILER_INTEL12
196 # elif __INTEL_COMPILER == 1210
197 # define GLM_COMPILER GLM_COMPILER_INTEL12_1
198 # elif __INTEL_COMPILER == 1300
199 # define GLM_COMPILER GLM_COMPILER_INTEL13
200 # elif __INTEL_COMPILER == 1400
201 # define GLM_COMPILER GLM_COMPILER_INTEL14
202 # elif __INTEL_COMPILER >= 1500
203 # define GLM_COMPILER GLM_COMPILER_INTEL15
204 # elif __INTEL_COMPILER >= 1600
205 # define GLM_COMPILER GLM_COMPILER_INTEL16
207 # define GLM_COMPILER GLM_COMPILER_INTEL
211 #elif defined(__CUDACC__)
212 # if !defined(CUDA_VERSION) && !defined(GLM_FORCE_CUDA)
215 # if CUDA_VERSION < 3000
216 # error "GLM requires CUDA 3.0 or higher"
218 # define GLM_COMPILER GLM_COMPILER_CUDA
222 #elif defined(_MSC_VER)
224 # error "GLM requires Visual C++ 2010 or higher"
225 # elif _MSC_VER == 1600
226 # define GLM_COMPILER GLM_COMPILER_VC2010
227 # elif _MSC_VER == 1700
228 # define GLM_COMPILER GLM_COMPILER_VC2012
229 # elif _MSC_VER == 1800
230 # define GLM_COMPILER GLM_COMPILER_VC2013
231 # elif _MSC_VER >= 1900
232 # define GLM_COMPILER GLM_COMPILER_VC2015
234 # define GLM_COMPILER GLM_COMPILER_VC
238 #elif defined(__clang__)
239 # if GLM_PLATFORM & GLM_PLATFORM_APPLE
240 # if __clang_major__ == 4 && __clang_minor__ == 0
241 # define GLM_COMPILER GLM_COMPILER_APPLE_CLANG40
242 # elif __clang_major__ == 4 && __clang_minor__ == 1
243 # define GLM_COMPILER GLM_COMPILER_APPLE_CLANG41
244 # elif __clang_major__ == 4 && __clang_minor__ == 2
245 # define GLM_COMPILER GLM_COMPILER_APPLE_CLANG42
246 # elif __clang_major__ == 5 && __clang_minor__ == 0
247 # define GLM_COMPILER GLM_COMPILER_APPLE_CLANG50
248 # elif __clang_major__ == 5 && __clang_minor__ == 1
249 # define GLM_COMPILER GLM_COMPILER_APPLE_CLANG51
250 # elif __clang_major__ == 6 && __clang_minor__ == 0
251 # define GLM_COMPILER GLM_COMPILER_APPLE_CLANG60
252 # elif __clang_major__ == 6 && __clang_minor__ >= 1
253 # define GLM_COMPILER GLM_COMPILER_APPLE_CLANG61
254 # elif __clang_major__ >= 7
255 # define GLM_COMPILER GLM_COMPILER_APPLE_CLANG61
257 # define GLM_COMPILER GLM_COMPILER_APPLE_CLANG
260 # if __clang_major__ == 3 && __clang_minor__ == 0
261 # define GLM_COMPILER GLM_COMPILER_LLVM30
262 # elif __clang_major__ == 3 && __clang_minor__ == 1
263 # define GLM_COMPILER GLM_COMPILER_LLVM31
264 # elif __clang_major__ == 3 && __clang_minor__ == 2
265 # define GLM_COMPILER GLM_COMPILER_LLVM32
266 # elif __clang_major__ == 3 && __clang_minor__ == 3
267 # define GLM_COMPILER GLM_COMPILER_LLVM33
268 # elif __clang_major__ == 3 && __clang_minor__ == 4
269 # define GLM_COMPILER GLM_COMPILER_LLVM34
270 # elif __clang_major__ == 3 && __clang_minor__ == 5
271 # define GLM_COMPILER GLM_COMPILER_LLVM35
272 # elif __clang_major__ == 3 && __clang_minor__ == 6
273 # define GLM_COMPILER GLM_COMPILER_LLVM36
274 # elif __clang_major__ == 3 && __clang_minor__ == 7
275 # define GLM_COMPILER GLM_COMPILER_LLVM37
276 # elif __clang_major__ == 3 && __clang_minor__ == 8
277 # define GLM_COMPILER GLM_COMPILER_LLVM38
278 # elif __clang_major__ == 3 && __clang_minor__ >= 9
279 # define GLM_COMPILER GLM_COMPILER_LLVM39
280 # elif __clang_major__ >= 4
281 # define GLM_COMPILER GLM_COMPILER_LLVM39
283 # define GLM_COMPILER GLM_COMPILER_LLVM
288 #elif defined(__GNUC__) || defined(__MINGW32__)
289 # if (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
290 # define GLM_COMPILER (GLM_COMPILER_GCC42)
291 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
292 # define GLM_COMPILER (GLM_COMPILER_GCC43)
293 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)
294 # define GLM_COMPILER (GLM_COMPILER_GCC44)
295 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)
296 # define GLM_COMPILER (GLM_COMPILER_GCC45)
297 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
298 # define GLM_COMPILER (GLM_COMPILER_GCC46)
299 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)
300 # define GLM_COMPILER (GLM_COMPILER_GCC47)
301 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
302 # define GLM_COMPILER (GLM_COMPILER_GCC48)
303 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)
304 # define GLM_COMPILER (GLM_COMPILER_GCC49)
305 # elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0)
306 # define GLM_COMPILER (GLM_COMPILER_GCC50)
307 # elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 1)
308 # define GLM_COMPILER (GLM_COMPILER_GCC51)
309 # elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 2)
310 # define GLM_COMPILER (GLM_COMPILER_GCC52)
311 # elif (__GNUC__ == 5) && (__GNUC_MINOR__ >= 3)
312 # define GLM_COMPILER (GLM_COMPILER_GCC53)
314 # define GLM_COMPILER (GLM_COMPILER_GCC)
318 # define GLM_COMPILER GLM_COMPILER_UNKNOWN
322 #error "GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message."
326 #if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED)
327 # define GLM_MESSAGE_COMPILER_DISPLAYED
328 # if GLM_COMPILER & GLM_COMPILER_CUDA
329 # pragma message("GLM: CUDA compiler detected")
330 # elif GLM_COMPILER & GLM_COMPILER_VC
331 # pragma message("GLM: Visual C++ compiler detected")
332 # elif GLM_COMPILER & GLM_COMPILER_APPLE_CLANG
333 # pragma message("GLM: Clang compiler detected")
334 # elif GLM_COMPILER & GLM_COMPILER_LLVM
335 # pragma message("GLM: LLVM compiler detected")
336 # elif GLM_COMPILER & GLM_COMPILER_INTEL
337 # pragma message("GLM: Intel Compiler detected")
338 # elif GLM_COMPILER & GLM_COMPILER_GCC
339 # pragma message("GLM: GCC compiler detected")
341 # pragma message("GLM: Compiler not detected")
348 #if defined(__arch64__) || defined(__LP64__) || defined(_M_X64) || defined(__ppc64__) || defined(__x86_64__)
349 # define GLM_MODEL GLM_MODEL_64
350 #elif defined(__i386__) || defined(__ppc__)
351 # define GLM_MODEL GLM_MODEL_32
353 # define GLM_MODEL GLM_MODEL_32
356 #if !defined(GLM_MODEL) && GLM_COMPILER != 0
357 # error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
360 #if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED)
361 # define GLM_MESSAGE_MODEL_DISPLAYED
362 # if(GLM_MODEL == GLM_MODEL_64)
363 # pragma message("GLM: 64 bits model")
364 # elif(GLM_MODEL == GLM_MODEL_32)
365 # pragma message("GLM: 32 bits model")
374 #define GLM_LANG_CXX98_FLAG (1 << 1)
375 #define GLM_LANG_CXX03_FLAG (1 << 2)
376 #define GLM_LANG_CXX0X_FLAG (1 << 3)
377 #define GLM_LANG_CXX11_FLAG (1 << 4)
378 #define GLM_LANG_CXX1Y_FLAG (1 << 5)
379 #define GLM_LANG_CXX14_FLAG (1 << 6)
380 #define GLM_LANG_CXX1Z_FLAG (1 << 7)
381 #define GLM_LANG_CXXMS_FLAG (1 << 8)
382 #define GLM_LANG_CXXGNU_FLAG (1 << 9)
384 #define GLM_LANG_CXX98 GLM_LANG_CXX98_FLAG
385 #define GLM_LANG_CXX03 (GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)
386 #define GLM_LANG_CXX0X (GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)
387 #define GLM_LANG_CXX11 (GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)
388 #define GLM_LANG_CXX1Y (GLM_LANG_CXX11 | GLM_LANG_CXX1Y_FLAG)
389 #define GLM_LANG_CXX14 (GLM_LANG_CXX1Y | GLM_LANG_CXX14_FLAG)
390 #define GLM_LANG_CXX1Z (GLM_LANG_CXX14 | GLM_LANG_CXX1Z_FLAG)
391 #define GLM_LANG_CXXMS GLM_LANG_CXXMS_FLAG
392 #define GLM_LANG_CXXGNU GLM_LANG_CXXGNU_FLAG
394 #if defined(GLM_FORCE_CXX14)
395 # undef GLM_FORCE_CXX11
396 # undef GLM_FORCE_CXX03
397 # undef GLM_FORCE_CXX98
398 # define GLM_LANG GLM_LANG_CXX14
399 #elif defined(GLM_FORCE_CXX11)
400 # undef GLM_FORCE_CXX03
401 # undef GLM_FORCE_CXX98
402 # define GLM_LANG GLM_LANG_CXX11
403 #elif defined(GLM_FORCE_CXX03)
404 # undef GLM_FORCE_CXX98
405 # define GLM_LANG GLM_LANG_CXX03
406 #elif defined(GLM_FORCE_CXX98)
407 # define GLM_LANG GLM_LANG_CXX98
409 # if GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
410 # if __cplusplus >= 201402L // GLM_COMPILER_LLVM34 + -std=c++14
411 # define GLM_LANG GLM_LANG_CXX14
412 # elif __has_feature(cxx_decltype_auto) && __has_feature(cxx_aggregate_nsdmi) // GLM_COMPILER_LLVM33 + -std=c++1y
413 # define GLM_LANG GLM_LANG_CXX1Y
414 # elif __cplusplus >= 201103L // GLM_COMPILER_LLVM33 + -std=c++11
415 # define GLM_LANG GLM_LANG_CXX11
416 # elif __has_feature(cxx_static_assert) // GLM_COMPILER_LLVM29 + -std=c++11
417 # define GLM_LANG GLM_LANG_CXX0X
418 # elif __cplusplus >= 199711L
419 # define GLM_LANG GLM_LANG_CXX98
421 # define GLM_LANG GLM_LANG_CXX
423 # elif GLM_COMPILER & GLM_COMPILER_GCC
424 # if __cplusplus >= 201402L
425 # define GLM_LANG GLM_LANG_CXX14
426 # elif __cplusplus >= 201103L
427 # define GLM_LANG GLM_LANG_CXX11
428 # elif defined(__GXX_EXPERIMENTAL_CXX0X__)
429 # define GLM_LANG GLM_LANG_CXX0X
431 # define GLM_LANG GLM_LANG_CXX98
433 # elif GLM_COMPILER & GLM_COMPILER_VC
434 # ifdef _MSC_EXTENSIONS
435 # if __cplusplus >= 201402L
436 # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
439 # elif __cplusplus >= 201103L
440 # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
441 # elif GLM_COMPILER >= GLM_COMPILER_VC2010
442 # define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
443 # elif __cplusplus >= 199711L
444 # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
446 # define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG)
449 # if __cplusplus >= 201402L
450 # define GLM_LANG GLM_LANG_CXX14
453 # elif __cplusplus >= 201103L
454 # define GLM_LANG GLM_LANG_CXX11
455 # elif GLM_COMPILER >= GLM_COMPILER_VC2010
456 # define GLM_LANG GLM_LANG_CXX0X
457 # elif __cplusplus >= 199711L
458 # define GLM_LANG GLM_LANG_CXX98
460 # define GLM_LANG GLM_LANG_CXX
463 # elif GLM_COMPILER & GLM_COMPILER_INTEL
464 # ifdef _MSC_EXTENSIONS
465 # if __cplusplus >= 201402L
466 # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
467 # elif __cplusplus >= 201103L
468 # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
469 # elif GLM_COMPILER >= GLM_COMPILER_INTEL13
470 # define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
471 # elif __cplusplus >= 199711L
472 # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
474 # define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG)
477 # if __cplusplus >= 201402L
478 # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
479 # elif __cplusplus >= 201103L
480 # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
481 # elif GLM_COMPILER >= GLM_COMPILER_INTEL13
482 # define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
483 # elif __cplusplus >= 199711L
484 # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
486 # define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG)
489 # else // Unkown compiler
490 # if __cplusplus >= 201402L
491 # define GLM_LANG GLM_LANG_CXX14
492 # elif __cplusplus >= 201103L
493 # define GLM_LANG GLM_LANG_CXX11
494 # elif __cplusplus >= 199711L
495 # define GLM_LANG GLM_LANG_CXX98
497 # define GLM_LANG GLM_LANG_CXX // Good luck with that!
499 # ifndef GLM_FORCE_PURE
500 # define GLM_FORCE_PURE
505 #if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED)
506 # define GLM_MESSAGE_LANG_DISPLAYED
508 # if GLM_LANG & GLM_LANG_CXX1Z_FLAG
509 # pragma message("GLM: C++1z")
510 # elif GLM_LANG & GLM_LANG_CXX14_FLAG
511 # pragma message("GLM: C++14")
512 # elif GLM_LANG & GLM_LANG_CXX1Y_FLAG
513 # pragma message("GLM: C++1y")
514 # elif GLM_LANG & GLM_LANG_CXX11_FLAG
515 # pragma message("GLM: C++11")
516 # elif GLM_LANG & GLM_LANG_CXX0X_FLAG
517 # pragma message("GLM: C++0x")
518 # elif GLM_LANG & GLM_LANG_CXX03_FLAG
519 # pragma message("GLM: C++03")
520 # elif GLM_LANG & GLM_LANG_CXX98_FLAG
521 # pragma message("GLM: C++98")
523 # pragma message("GLM: C++ language undetected")
526 # if GLM_LANG & (GLM_LANG_CXXGNU_FLAG | GLM_LANG_CXXMS_FLAG)
527 # pragma message("GLM: Language extensions enabled")
538 #if GLM_PLATFORM == GLM_PLATFORM_ANDROID
539 # define GLM_HAS_CXX11_STL 0
540 #elif GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
541 # if __has_include(<__config>) // libc++
546 # if defined(_LIBCPP_VERSION)// || defined(__GLIBCXX__)
547 # define GLM_HAS_CXX11_STL 1
549 # define GLM_HAS_CXX11_STL 0
552 # define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && \
553 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
554 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \
555 ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15)))
559 #if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
560 # define GLM_HAS_STATIC_ASSERT __has_feature(cxx_static_assert)
561 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
562 # define GLM_HAS_STATIC_ASSERT 1
564 # define GLM_HAS_STATIC_ASSERT (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
565 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
566 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010)))
570 #if GLM_LANG & GLM_LANG_CXX11_FLAG
571 # define GLM_HAS_EXTENDED_INTEGER_TYPE 1
573 # define GLM_HAS_EXTENDED_INTEGER_TYPE (\
574 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \
575 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
576 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_LLVM) && (GLM_COMPILER >= GLM_COMPILER_LLVM30)) || \
577 ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_APPLE_CLANG) && (GLM_COMPILER >= GLM_COMPILER_APPLE_CLANG40)))
581 #if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
582 # define GLM_HAS_CONSTEXPR __has_feature(cxx_constexpr)
583 # define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
584 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
585 # define GLM_HAS_CONSTEXPR 1
586 # define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
588 # define GLM_HAS_CONSTEXPR (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
589 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)))
590 # define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR || ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015))
594 #if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
595 # define GLM_HAS_INITIALIZER_LISTS __has_feature(cxx_generalized_initializers)
596 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
597 # define GLM_HAS_INITIALIZER_LISTS 1
599 # define GLM_HAS_INITIALIZER_LISTS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
600 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
601 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
605 #if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
606 # define GLM_HAS_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions)
607 #elif GLM_LANG & (GLM_LANG_CXX11_FLAG | GLM_LANG_CXXMS_FLAG)
608 # define GLM_HAS_UNRESTRICTED_UNIONS 1
610 # define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
611 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)))
615 #if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
616 # define GLM_HAS_DEFAULTED_FUNCTIONS __has_feature(cxx_defaulted_functions)
617 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
618 # define GLM_HAS_DEFAULTED_FUNCTIONS 1
620 # define GLM_HAS_DEFAULTED_FUNCTIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
621 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
622 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \
623 ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12)))
627 #if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
628 # define GLM_HAS_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
629 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
630 # define GLM_HAS_RVALUE_REFERENCES 1
632 # define GLM_HAS_RVALUE_REFERENCES (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
633 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
634 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)))
638 #if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
639 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS __has_feature(cxx_explicit_conversions)
640 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
641 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS 1
643 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
644 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC45)) || \
645 ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
646 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
650 #if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
651 # define GLM_HAS_TEMPLATE_ALIASES __has_feature(cxx_alias_templates)
652 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
653 # define GLM_HAS_TEMPLATE_ALIASES 1
655 # define GLM_HAS_TEMPLATE_ALIASES (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
656 ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12_1)) || \
657 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC47)) || \
658 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
662 #if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
663 # define GLM_HAS_RANGE_FOR __has_feature(cxx_range_for)
664 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
665 # define GLM_HAS_RANGE_FOR 1
667 # define GLM_HAS_RANGE_FOR (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
668 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
669 ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL13)) || \
670 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)))
674 #if GLM_LANG & GLM_LANG_CXX11_FLAG
675 # define GLM_HAS_ASSIGNABLE 1
677 # define GLM_HAS_ASSIGNABLE (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
678 ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49)))
682 #define GLM_HAS_TRIVIAL_QUERIES 0
685 #if GLM_LANG & GLM_LANG_CXX11_FLAG
686 # define GLM_HAS_MAKE_SIGNED 1
688 # define GLM_HAS_MAKE_SIGNED (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
689 ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
693 #if GLM_ARCH == GLM_ARCH_PURE
694 # define GLM_HAS_BITSCAN_WINDOWS 0
696 # define GLM_HAS_BITSCAN_WINDOWS (GLM_PLATFORM & GLM_PLATFORM_WINDOWS) && (\
697 (GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_LLVM | GLM_COMPILER_INTEL))
702 # if GLM_COMPILER & GLM_COMPILER_GCC
703 # if GLM_COMPILER >= GLM_COMPILER_GCC47
704 # define GLM_HAS_OPENMP 31
705 # elif GLM_COMPILER >= GLM_COMPILER_GCC44
706 # define GLM_HAS_OPENMP 30
707 # elif GLM_COMPILER >= GLM_COMPILER_GCC42
708 # define GLM_HAS_OPENMP 25
710 # endif// GLM_COMPILER & GLM_COMPILER_GCC
712 # if GLM_COMPILER & GLM_COMPILER_VC
713 # if GLM_COMPILER >= GLM_COMPILER_VC2010
714 # define GLM_HAS_OPENMP 20
716 # endif// GLM_COMPILER & GLM_COMPILER_VC
720 #define GLM_HAS_ANONYMOUS_UNION (GLM_LANG & GLM_LANG_CXXMS_FLAG)
727 #define GLM_ARCH_PURE 0x0000
728 #define GLM_ARCH_ARM 0x0001
729 #define GLM_ARCH_X86 0x0002
730 #define GLM_ARCH_SSE2 0x0004
731 #define GLM_ARCH_SSE3 0x0008
732 #define GLM_ARCH_SSE4 0x0010
733 #define GLM_ARCH_AVX 0x0020
734 #define GLM_ARCH_AVX2 0x0040
736 #if defined(GLM_FORCE_PURE)
737 # define GLM_ARCH GLM_ARCH_PURE
738 #elif defined(GLM_FORCE_AVX2)
739 # define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
740 #elif defined(GLM_FORCE_AVX)
741 # define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
742 #elif defined(GLM_FORCE_SSE4)
743 # define GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
744 #elif defined(GLM_FORCE_SSE3)
745 # define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
746 #elif defined(GLM_FORCE_SSE2)
747 # define GLM_ARCH (GLM_ARCH_SSE2)
748 #elif (GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM | GLM_COMPILER_GCC)) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_LINUX))
750 # define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
752 # define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
754 # define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
756 # define GLM_ARCH (GLM_ARCH_SSE2)
758 # define GLM_ARCH GLM_ARCH_PURE
760 #elif (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
761 # if defined(_M_ARM_FP)
762 # define GLM_ARCH (GLM_ARCH_ARM)
763 # elif defined(__AVX2__)
764 # define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
765 # elif defined(__AVX__)
766 # define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
767 # elif _M_IX86_FP == 2
768 # define GLM_ARCH (GLM_ARCH_SSE2)
770 # define GLM_ARCH (GLM_ARCH_PURE)
772 #elif (GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))
773 # if defined(__AVX2__)
774 # define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
775 # elif defined(__AVX__)
776 # define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
777 # elif defined(__SSE4_1__ )
778 # define GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
779 # elif defined(__SSE3__)
780 # define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
781 # elif defined(__SSE2__)
782 # define GLM_ARCH (GLM_ARCH_SSE2)
784 # define GLM_ARCH (GLM_ARCH_PURE)
787 # define GLM_ARCH GLM_ARCH_PURE
793 #if defined(__MINGW64__) && (GLM_ARCH != GLM_ARCH_PURE)
797 #if GLM_ARCH & GLM_ARCH_AVX2
798 # include <immintrin.h>
800 #if GLM_ARCH & GLM_ARCH_AVX
801 # include <immintrin.h>
803 #if GLM_ARCH & GLM_ARCH_SSE4
804 # include <smmintrin.h>
806 #if GLM_ARCH & GLM_ARCH_SSE3
807 # include <pmmintrin.h>
809 #if GLM_ARCH & GLM_ARCH_SSE2
810 # include <emmintrin.h>
811 # if(GLM_COMPILER == GLM_COMPILER_VC2005) // VC2005 is missing some intrinsics, workaround
812 inline float _mm_cvtss_f32(__m128 A) {
return A.m128_f32[0]; }
813 inline __m128 _mm_castpd_ps(__m128d PD) {
union { __m128 ps; __m128d pd; } c; c.pd = PD;
return c.ps; }
814 inline __m128d _mm_castps_pd(__m128 PS) {
union { __m128 ps; __m128d pd; } c; c.ps = PS;
return c.pd; }
815 inline __m128i _mm_castps_si128(__m128 PS) {
union { __m128 ps; __m128i
pi; } c; c.ps = PS;
return c.pi; }
816 inline __m128 _mm_castsi128_ps(__m128i PI) {
union { __m128 ps; __m128i
pi; } c; c.pi = PI;
return c.ps; }
820 #if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED)
821 # define GLM_MESSAGE_ARCH_DISPLAYED
822 # if(GLM_ARCH == GLM_ARCH_PURE)
823 # pragma message("GLM: Platform independent code")
824 # elif(GLM_ARCH & GLM_ARCH_ARM)
825 # pragma message("GLM: ARM instruction set")
826 # elif(GLM_ARCH & GLM_ARCH_AVX2)
827 # pragma message("GLM: AVX2 instruction set")
828 # elif(GLM_ARCH & GLM_ARCH_AVX)
829 # pragma message("GLM: AVX instruction set")
830 # elif(GLM_ARCH & GLM_ARCH_SSE3)
831 # pragma message("GLM: SSE3 instruction set")
832 # elif(GLM_ARCH & GLM_ARCH_SSE2)
833 # pragma message("GLM: SSE2 instruction set")
840 #if GLM_HAS_STATIC_ASSERT
841 # define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
842 #elif defined(BOOST_STATIC_ASSERT)
843 # define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
844 #elif GLM_COMPILER & GLM_COMPILER_VC
845 # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
847 # define GLM_STATIC_ASSERT(x, message)
848 # define GLM_STATIC_ASSERT_NULL
854 #if GLM_COMPILER & GLM_COMPILER_CUDA
855 # define GLM_CUDA_FUNC_DEF __device__ __host__
856 # define GLM_CUDA_FUNC_DECL __device__ __host__
858 # define GLM_CUDA_FUNC_DEF
859 # define GLM_CUDA_FUNC_DECL
862 #if GLM_COMPILER & GLM_COMPILER_GCC
863 # define GLM_VAR_USED __attribute__ ((unused))
865 # define GLM_VAR_USED
868 #if defined(GLM_FORCE_INLINE)
869 # if GLM_COMPILER & GLM_COMPILER_VC
870 # define GLM_INLINE __forceinline
871 # define GLM_NEVER_INLINE __declspec((noinline))
872 # elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
873 # define GLM_INLINE inline __attribute__((__always_inline__))
874 # define GLM_NEVER_INLINE __attribute__((__noinline__))
876 # define GLM_INLINE inline
877 # define GLM_NEVER_INLINE
878 # endif//GLM_COMPILER
880 # define GLM_INLINE inline
881 # define GLM_NEVER_INLINE
882 #endif//defined(GLM_FORCE_INLINE)
884 #define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
885 #define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
892 #if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED)
893 # define GLM_MESSAGE_SWIZZLE_DISPLAYED
894 # if defined(GLM_SWIZZLE)
895 # pragma message("GLM: Swizzling operators enabled")
897 # pragma message("GLM: Swizzling operators disabled, #define GLM_SWIZZLE to enable swizzle operators")
904 #if (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
905 # define GLM_DEPRECATED __declspec(deprecated)
906 # define GLM_ALIGN(x) __declspec(align(x))
907 # define GLM_ALIGNED_STRUCT(x) struct __declspec(align(x))
908 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name
909 # define GLM_RESTRICT __declspec(restrict)
910 # define GLM_RESTRICT_VAR __restrict
911 #elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM | GLM_COMPILER_CUDA | GLM_COMPILER_INTEL)
912 # define GLM_DEPRECATED __attribute__((__deprecated__))
913 # define GLM_ALIGN(x) __attribute__((aligned(x)))
914 # define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))
915 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(alignment)))
916 # define GLM_RESTRICT __restrict__
917 # define GLM_RESTRICT_VAR __restrict__
919 # define GLM_DEPRECATED
921 # define GLM_ALIGNED_STRUCT(x) struct
922 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name
923 # define GLM_RESTRICT
924 # define GLM_RESTRICT_VAR
927 #if GLM_HAS_DEFAULTED_FUNCTIONS
928 # define GLM_DEFAULT = default
929 # ifdef GLM_FORCE_NO_CTOR_INIT
930 # define GLM_DEFAULT_CTOR = default
932 # define GLM_DEFAULT_CTOR
936 # define GLM_DEFAULT_CTOR
939 #if GLM_HAS_CONSTEXPR
940 # define GLM_CONSTEXPR constexpr
941 # define GLM_RELAXED_CONSTEXPR constexpr
943 # define GLM_CONSTEXPR
944 # define GLM_RELAXED_CONSTEXPR const
947 #ifdef GLM_FORCE_EXPLICIT_CTOR
948 # define GLM_EXPLICIT explicit
950 # define GLM_EXPLICIT
961 # if defined(GLM_FORCE_SIZE_T_LENGTH) || defined(GLM_FORCE_SIZE_FUNC)
962 typedef size_t length_t;
964 typedef int length_t;
969 # ifdef GLM_FORCE_SIZE_FUNC
970 typedef size_t component_count_t;
972 typedef length_t component_count_t;
975 template <
typename genType>
976 GLM_FUNC_QUALIFIER GLM_CONSTEXPR component_count_t component_count(genType
const & m)
978 # ifdef GLM_FORCE_SIZE_FUNC
987 #if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH)
988 # define GLM_MESSAGE_FORCE_SIZE_T_LENGTH
989 # if defined GLM_FORCE_SIZE_FUNC
990 # pragma message("GLM: .length() is replaced by .size() and returns a std::size_t")
991 # elif defined GLM_FORCE_SIZE_T_LENGTH
992 # pragma message("GLM: .length() returns glm::length_t, a typedef of std::size_t")
994 # pragma message("GLM: .length() returns glm::length_t, a typedef of int following the GLSL specification")
1001 #ifndef __has_feature
1002 # define __has_feature(x) 0 // Compatibility with non-clang compilers.
1005 #if GLM_HAS_CONSTEXPR_PARTIAL
1008 template <
typename T, std::
size_t N>
1009 constexpr std::size_t countof(T
const (&)[N])
1014 # define GLM_COUNTOF(arr) glm::countof(arr)
1016 # define GLM_COUNTOF(arr) _countof(arr)
1018 # define GLM_COUNTOF(arr) sizeof(arr) / sizeof(arr[0])
1026 enum ctor{uninitialize};
GLM_FUNC_DECL genType pi()
Return the pi constant.