stellarlib 0.1.0
Loading...
Searching...
No Matches
lin.hpp
1/* clang-format off */
2
3/*
4 stellarlib
5 Copyright (C) 2025-2026 Domán Zana
6
7 This software is provided 'as-is', without any express or implied
8 warranty. In no event will the authors be held liable for any damages
9 arising from the use of this software.
10
11 Permission is granted to anyone to use this software for any purpose,
12 including commercial applications, and to alter it and redistribute it
13 freely, subject to the following restrictions:
14
15 1. The origin of this software must not be misrepresented; you must not
16 claim that you wrote the original software. If you use this software
17 in a product, an acknowledgment in the product documentation would be
18 appreciated but is not required.
19 2. Altered source versions must be plainly marked as such, and must not be
20 misrepresented as being the original software.
21 3. This notice may not be removed or altered from any source distribution.
22*/
23
24#ifndef STELLARLIB_LIN_LIN_HPP
25#define STELLARLIB_LIN_LIN_HPP
26
27/* IWYU pragma: begin_exports */
28#include <stellarlib/lin/intrinsics.hpp>
29#include <stellarlib/lin/matrix.hpp>
30#include <stellarlib/lin/transformations.hpp>
31/* IWYU pragma: end_exports */
32
33#include <cstddef>
34#include <cstdint>
35
36/**
37 * @brief Linear algebra utilities
38 */
39namespace stellarlib::lin
40{
41/**
42 * @brief Generic M*N matrix with per-component operations
43 * @tparam T Arithmetic type of the components
44 * @tparam M Number of rows in the matrix
45 * @tparam N Number of columns in the matrix
46 */
47template <typename T, std::size_t M = 4, std::size_t N = 4>
48using matrix = internal::matrix<T, M, N>;
49
50/**
51 * @brief Generic N-dimensional vector with per-component operations
52 * @tparam T Arithmetic type of the components
53 * @tparam N Dimension of the vector
54 */
55template <typename T, std::size_t N = 4>
57
58/**
59 * @brief 1D boolean vector
60 */
62
63/**
64 * @brief 2D boolean vector
65 */
67
68/**
69 * @brief 3D boolean vector
70 */
72
73/**
74 * @brief 4D boolean vector
75 */
77
78/**
79 * @brief 1D char vector
80 */
82
83/**
84 * @brief 2D char vector
85 */
87
88/**
89 * @brief 3D char vector
90 */
92
93/**
94 * @brief 4D char vector
95 */
97
98/**
99 * @brief 1D unsigned char vector
100 */
102
103/**
104 * @brief 2D unsigned char vector
105 */
107
108/**
109 * @brief 3D unsigned char vector
110 */
112
113/**
114 * @brief 4D unsigned char vector
115 */
117
118/**
119 * @brief 1D short vector
120 */
122
123/**
124 * @brief 2D short vector
125 */
127
128/**
129 * @brief 3D short vector
130 */
132
133/**
134 * @brief 4D short vector
135 */
137
138/**
139 * @brief 1D unsigned short vector
140 */
142
143/**
144 * @brief 2D unsigned short vector
145 */
147
148/**
149 * @brief 3D unsigned short vector
150 */
152
153/**
154 * @brief 4D unsigned short vector
155 */
157
158/**
159 * @brief 1D integer vector
160 */
162
163/**
164 * @brief 2D integer vector
165 */
167
168/**
169 * @brief 3D integer vector
170 */
172
173/**
174 * @brief 4D integer vector
175 */
177
178/**
179 * @brief 1D unsigned integer vector
180 */
182
183/**
184 * @brief 2D unsigned integer vector
185 */
187
188/**
189 * @brief 3D unsigned integer vector
190 */
192
193/**
194 * @brief 4D unsigned integer vector
195 */
197
198/**
199 * @brief 1D long vector
200 */
202
203/**
204 * @brief 2D long vector
205 */
207
208/**
209 * @brief 3D long vector
210 */
212
213/**
214 * @brief 4D long vector
215 */
217
218/**
219 * @brief 1D unsigned long vector
220 */
222
223/**
224 * @brief 2D unsigned long vector
225 */
227
228/**
229 * @brief 3D unsigned long vector
230 */
232
233/**
234 * @brief 4D unsigned long vector
235 */
237
238/**
239 * @brief 1D float vector
240 */
242
243/**
244 * @brief 2D float vector
245 */
247
248/**
249 * @brief 3D float vector
250 */
252
253/**
254 * @brief 4D float vector
255 */
257
258/**
259 * @brief 1D double vector
260 */
262
263/**
264 * @brief 2D double vector
265 */
267
268/**
269 * @brief 3D double vector
270 */
272
273/**
274 * @brief 4D double vector
275 */
277
278/**
279 * @brief 1x1 boolean matrix
280 */
282
283/**
284 * @brief 2x1 boolean matrix
285 */
287
288/**
289 * @brief 3x1 boolean matrix
290 */
292
293/**
294 * @brief 4x1 boolean matrix
295 */
297
298/**
299 * @brief 1x2 boolean matrix
300 */
302
303/**
304 * @brief 2x2 boolean matrix
305 */
307
308/**
309 * @brief 3x2 boolean matrix
310 */
312
313/**
314 * @brief 4x2 boolean matrix
315 */
317
318/**
319 * @brief 1x3 boolean matrix
320 */
322
323/**
324 * @brief 2x3 boolean matrix
325 */
327
328/**
329 * @brief 3x3 boolean matrix
330 */
332
333/**
334 * @brief 4x3 boolean matrix
335 */
337
338/**
339 * @brief 1x4 boolean matrix
340 */
342
343/**
344 * @brief 2x4 boolean matrix
345 */
347
348/**
349 * @brief 3x4 boolean matrix
350 */
352
353/**
354 * @brief 4x4 boolean matrix
355 */
357
358/**
359 * @brief 1x1 char matrix
360 */
362
363/**
364 * @brief 2x1 char matrix
365 */
367
368/**
369 * @brief 3x1 char matrix
370 */
372
373/**
374 * @brief 4x1 char matrix
375 */
377
378/**
379 * @brief 1x2 char matrix
380 */
382
383/**
384 * @brief 2x2 char matrix
385 */
387
388/**
389 * @brief 3x2 char matrix
390 */
392
393/**
394 * @brief 4x2 char matrix
395 */
397
398/**
399 * @brief 1x3 char matrix
400 */
402
403/**
404 * @brief 2x3 char matrix
405 */
407
408/**
409 * @brief 3x3 char matrix
410 */
412
413/**
414 * @brief 4x3 char matrix
415 */
417
418/**
419 * @brief 1x4 char matrix
420 */
422
423/**
424 * @brief 2x4 char matrix
425 */
427
428/**
429 * @brief 3x4 char matrix
430 */
432
433/**
434 * @brief 4x4 char matrix
435 */
437
438/**
439 * @brief 1x1 unsigned char matrix
440 */
442
443/**
444 * @brief 2x1 unsigned char matrix
445 */
447
448/**
449 * @brief 3x1 unsigned char matrix
450 */
452
453/**
454 * @brief 4x1 unsigned char matrix
455 */
457
458/**
459 * @brief 1x2 unsigned char matrix
460 */
462
463/**
464 * @brief 2x2 unsigned char matrix
465 */
467
468/**
469 * @brief 3x2 unsigned char matrix
470 */
472
473/**
474 * @brief 4x2 unsigned char matrix
475 */
477
478/**
479 * @brief 1x3 unsigned char matrix
480 */
482
483/**
484 * @brief 2x3 unsigned char matrix
485 */
487
488/**
489 * @brief 3x3 unsigned char matrix
490 */
492
493/**
494 * @brief 4x3 unsigned char matrix
495 */
497
498/**
499 * @brief 1x4 unsigned char matrix
500 */
502
503/**
504 * @brief 2x4 unsigned char matrix
505 */
507
508/**
509 * @brief 3x4 unsigned char matrix
510 */
512
513/**
514 * @brief 4x4 unsigned char matrix
515 */
517
518/**
519 * @brief 1x1 short matrix
520 */
522
523/**
524 * @brief 2x1 short matrix
525 */
527
528/**
529 * @brief 3x1 short matrix
530 */
532
533/**
534 * @brief 4x1 short matrix
535 */
537
538/**
539 * @brief 1x2 short matrix
540 */
542
543/**
544 * @brief 2x2 short matrix
545 */
547
548/**
549 * @brief 3x2 short matrix
550 */
552
553/**
554 * @brief 4x2 short matrix
555 */
557
558/**
559 * @brief 1x3 short matrix
560 */
562
563/**
564 * @brief 2x3 short matrix
565 */
567
568/**
569 * @brief 3x3 short matrix
570 */
572
573/**
574 * @brief 4x3 short matrix
575 */
577
578/**
579 * @brief 1x4 short matrix
580 */
582
583/**
584 * @brief 2x4 short matrix
585 */
587
588/**
589 * @brief 3x4 short matrix
590 */
592
593/**
594 * @brief 4x4 short matrix
595 */
597
598/**
599 * @brief 1x1 unsigned short matrix
600 */
602
603/**
604 * @brief 2x1 unsigned short matrix
605 */
607
608/**
609 * @brief 3x1 unsigned short matrix
610 */
612
613/**
614 * @brief 4x1 unsigned short matrix
615 */
617
618/**
619 * @brief 1x2 unsigned short matrix
620 */
622
623/**
624 * @brief 2x2 unsigned short matrix
625 */
627
628/**
629 * @brief 3x2 unsigned short matrix
630 */
632
633/**
634 * @brief 4x2 unsigned short matrix
635 */
637
638/**
639 * @brief 1x3 unsigned short matrix
640 */
642
643/**
644 * @brief 2x3 unsigned short matrix
645 */
647
648/**
649 * @brief 3x3 unsigned short matrix
650 */
652
653/**
654 * @brief 4x3 unsigned short matrix
655 */
657
658/**
659 * @brief 1x4 unsigned short matrix
660 */
662
663/**
664 * @brief 2x4 unsigned short matrix
665 */
667
668/**
669 * @brief 3x4 unsigned short matrix
670 */
672
673/**
674 * @brief 4x4 unsigned short matrix
675 */
677
678/**
679 * @brief 1x1 integer matrix
680 */
681using int1x1 = int1;
682
683/**
684 * @brief 2x1 integer matrix
685 */
687
688/**
689 * @brief 3x1 integer matrix
690 */
692
693/**
694 * @brief 4x1 integer matrix
695 */
697
698/**
699 * @brief 1x2 integer matrix
700 */
701using int1x2 = int2;
702
703/**
704 * @brief 2x2 integer matrix
705 */
707
708/**
709 * @brief 3x2 integer matrix
710 */
712
713/**
714 * @brief 4x2 integer matrix
715 */
717
718/**
719 * @brief 1x3 integer matrix
720 */
721using int1x3 = int3;
722
723/**
724 * @brief 2x3 integer matrix
725 */
727
728/**
729 * @brief 3x3 integer matrix
730 */
732
733/**
734 * @brief 4x3 integer matrix
735 */
737
738/**
739 * @brief 1x4 integer matrix
740 */
741using int1x4 = int4;
742
743/**
744 * @brief 2x4 integer matrix
745 */
747
748/**
749 * @brief 3x4 integer matrix
750 */
752
753/**
754 * @brief 4x4 integer matrix
755 */
757
758/**
759 * @brief 1x1 unsigned integer matrix
760 */
762
763/**
764 * @brief 2x1 unsigned integer matrix
765 */
767
768/**
769 * @brief 3x1 unsigned integer matrix
770 */
772
773/**
774 * @brief 4x1 unsigned integer matrix
775 */
777
778/**
779 * @brief 1x2 unsigned integer matrix
780 */
782
783/**
784 * @brief 2x2 unsigned integer matrix
785 */
787
788/**
789 * @brief 3x2 unsigned integer matrix
790 */
792
793/**
794 * @brief 4x2 unsigned integer matrix
795 */
797
798/**
799 * @brief 1x3 unsigned integer matrix
800 */
802
803/**
804 * @brief 2x3 unsigned integer matrix
805 */
807
808/**
809 * @brief 3x3 unsigned integer matrix
810 */
812
813/**
814 * @brief 4x3 unsigned integer matrix
815 */
817
818/**
819 * @brief 1x4 unsigned integer matrix
820 */
822
823/**
824 * @brief 2x4 unsigned integer matrix
825 */
827
828/**
829 * @brief 3x4 unsigned integer matrix
830 */
832
833/**
834 * @brief 4x4 unsigned integer matrix
835 */
837
838/**
839 * @brief 1x1 long matrix
840 */
842
843/**
844 * @brief 2x1 long matrix
845 */
847
848/**
849 * @brief 3x1 long matrix
850 */
852
853/**
854 * @brief 4x1 long matrix
855 */
857
858/**
859 * @brief 1x2 long matrix
860 */
862
863/**
864 * @brief 2x2 long matrix
865 */
867
868/**
869 * @brief 3x2 long matrix
870 */
872
873/**
874 * @brief 4x2 long matrix
875 */
877
878/**
879 * @brief 1x3 long matrix
880 */
882
883/**
884 * @brief 2x3 long matrix
885 */
887
888/**
889 * @brief 3x3 long matrix
890 */
892
893/**
894 * @brief 4x3 long matrix
895 */
897
898/**
899 * @brief 1x4 long matrix
900 */
902
903/**
904 * @brief 2x4 long matrix
905 */
907
908/**
909 * @brief 3x4 long matrix
910 */
912
913/**
914 * @brief 4x4 long matrix
915 */
917
918/**
919 * @brief 1x1 unsigned long matrix
920 */
922
923/**
924 * @brief 2x1 unsigned long matrix
925 */
927
928/**
929 * @brief 3x1 unsigned long matrix
930 */
932
933/**
934 * @brief 4x1 unsigned long matrix
935 */
937
938/**
939 * @brief 1x2 unsigned long matrix
940 */
942
943/**
944 * @brief 2x2 unsigned long matrix
945 */
947
948/**
949 * @brief 3x2 unsigned long matrix
950 */
952
953/**
954 * @brief 4x2 unsigned long matrix
955 */
957
958/**
959 * @brief 1x3 unsigned long matrix
960 */
962
963/**
964 * @brief 2x3 unsigned long matrix
965 */
967
968/**
969 * @brief 3x3 unsigned long matrix
970 */
972
973/**
974 * @brief 4x3 unsigned long matrix
975 */
977
978/**
979 * @brief 1x4 unsigned long matrix
980 */
982
983/**
984 * @brief 2x4 unsigned long matrix
985 */
987
988/**
989 * @brief 3x4 unsigned long matrix
990 */
992
993/**
994 * @brief 4x4 unsigned long matrix
995 */
997
998/**
999 * @brief 1x1 float matrix
1000 */
1002
1003/**
1004 * @brief 2x1 float matrix
1005 */
1007
1008/**
1009 * @brief 3x1 float matrix
1010 */
1012
1013/**
1014 * @brief 4x1 float matrix
1015 */
1017
1018/**
1019 * @brief 1x2 float matrix
1020 */
1022
1023/**
1024 * @brief 2x2 float matrix
1025 */
1027
1028/**
1029 * @brief 3x2 float matrix
1030 */
1032
1033/**
1034 * @brief 4x2 float matrix
1035 */
1037
1038/**
1039 * @brief 1x3 float matrix
1040 */
1042
1043/**
1044 * @brief 2x3 float matrix
1045 */
1047
1048/**
1049 * @brief 3x3 float matrix
1050 */
1052
1053/**
1054 * @brief 4x3 float matrix
1055 */
1057
1058/**
1059 * @brief 1x4 float matrix
1060 */
1062
1063/**
1064 * @brief 2x4 float matrix
1065 */
1067
1068/**
1069 * @brief 3x4 float matrix
1070 */
1072
1073/**
1074 * @brief 4x4 float matrix
1075 */
1077
1078/**
1079 * @brief 1x1 double matrix
1080 */
1082
1083/**
1084 * @brief 2x1 double matrix
1085 */
1087
1088/**
1089 * @brief 3x1 double matrix
1090 */
1092
1093/**
1094 * @brief 4x1 double matrix
1095 */
1097
1098/**
1099 * @brief 1x2 double matrix
1100 */
1102
1103/**
1104 * @brief 2x2 double matrix
1105 */
1107
1108/**
1109 * @brief 3x2 double matrix
1110 */
1112
1113/**
1114 * @brief 4x2 double matrix
1115 */
1117
1118/**
1119 * @brief 1x3 double matrix
1120 */
1122
1123/**
1124 * @brief 2x3 double matrix
1125 */
1127
1128/**
1129 * @brief 3x3 double matrix
1130 */
1132
1133/**
1134 * @brief 4x3 double matrix
1135 */
1137
1138/**
1139 * @brief 1x4 double matrix
1140 */
1142
1143/**
1144 * @brief 2x4 double matrix
1145 */
1147
1148/**
1149 * @brief 3x4 double matrix
1150 */
1152
1153/**
1154 * @brief 4x4 double matrix
1155 */
1157
1158/**
1159 * @brief Returns the absolute value of x (per-component)
1160 */
1161using internal::abs;
1162
1163/**
1164 * @brief Returns the arccosine of x (per-component)
1165 */
1166using internal::acos;
1167
1168/**
1169 * @brief Determines if all components of x are truthy
1170 */
1171using internal::all;
1172
1173/**
1174 * @brief Determines if any components of x are truthy
1175 */
1176using internal::any;
1177
1178/**
1179 * @brief Returns the arcsine of x (per-component)
1180 */
1181using internal::asin;
1182
1183/**
1184 * @brief Returns the arctangent of x (per-component)
1185 */
1186using internal::atan;
1187
1188/**
1189 * @brief Returns the arctangent of y and x (per-component)
1190 */
1191using internal::atan2;
1192
1193/**
1194 * @brief Returns the smallest integer value that is greater than or equal to x (per-component)
1195 */
1196using internal::ceil;
1197
1198/**
1199 * @brief Clamps x to the range [min, max] (per-component)
1200 */
1201using internal::clamp;
1202
1203/**
1204 * @brief Returns the cosine of x (per-component)
1205 */
1206using internal::cos;
1207
1208/**
1209 * @brief Returns the hyperbolic cosine of x (per-component)
1210 */
1211using internal::cosh;
1212
1213/**
1214 * @brief Returns the cross product of two 3D vectors
1215 */
1216using internal::cross;
1217
1218/**
1219 * @brief Converts x from radians to degrees (per-component)
1220 */
1221using internal::degrees;
1222
1223/**
1224 * @brief Returns the determinant of the specified square matrix
1225 */
1226using internal::determinant;
1227
1228/**
1229 * @brief Returns a distance scalar between two vectors
1230 */
1231using internal::distance;
1232
1233/**
1234 * @brief Returns the dot product of two vectors
1235 */
1236using internal::dot;
1237
1238/**
1239 * @brief Calculates a distance vector for lighting
1240 */
1241using internal::dst;
1242
1243/**
1244 * @brief Returns the base-e exponential of x (per-component)
1245 */
1246using internal::exp;
1247
1248/**
1249 * @brief Returns the base 2 exponential of x (per-component)
1250 */
1251using internal::exp2;
1252
1253/**
1254 * @brief Flips the surface-normal (if needed) to face in a direction opposite to i; returns the result in n
1255 */
1256using internal::faceforward;
1257
1258/**
1259 * @brief Returns the largest integer that is less than or equal to x (per-component)
1260 */
1261using internal::floor;
1262
1263/**
1264 * @brief Returns the fused multiply-addition of a*b+c (per-component)
1265 */
1266using internal::fma;
1267
1268/**
1269 * @brief Returns the floating-point remainder of x/y (per-component)
1270 */
1271using internal::fmod;
1272
1273/**
1274 * @brief Returns the fractional part of x; which is greater than or equal to 0 and less than 1 (per-component)
1275 */
1276using internal::frac;
1277
1278/**
1279 * @brief Returns the result of multiplying x by two, raised to the power of exp (per-component)
1280 */
1281using internal::ldexp;
1282
1283/**
1284 * @brief Returns the length of the specified vector
1285 */
1286using internal::length;
1287
1288/**
1289 * @brief Performs a linear interpolation (per-component)
1290 */
1291using internal::lerp;
1292
1293/**
1294 * @brief Returns a lighting coefficient vector
1295 */
1296using internal::lit;
1297
1298/**
1299 * @brief Returns the base-e logarithm of x (per-component)
1300 */
1301using internal::log;
1302
1303/**
1304 * @brief Returns the base-10 logarithm of x (per-component)
1305 */
1306using internal::log10;
1307
1308/**
1309 * @brief Returns the base-2 logarithm of x (per-component)
1310 */
1311using internal::log2;
1312
1313/**
1314 * @brief Performs an arithmetic multiply/add operation on a, b and c (per-component)
1315 */
1316using internal::mad;
1317
1318/**
1319 * @brief Selects the greater of x and y (per-component)
1320 */
1321using internal::max;
1322
1323/**
1324 * @brief Selects the lesser of x and y (per-component)
1325 */
1326using internal::min;
1327
1328/**
1329 * @brief Splits the value x into fractional and integer parts, each of which has the same sign as x (per-component)
1330 */
1331using internal::modf;
1332
1333/**
1334 * @brief Multiplies x and y using matrix math; the inner dimension x-columns and y-rows must be equal
1335 */
1336using internal::mul;
1337
1338/**
1339 * @brief Normalizes the specified vector according to x/length(x)
1340 */
1341using internal::normalize;
1342
1343/**
1344 * @brief Returns x raised to y (per-component)
1345 */
1346using internal::pow;
1347
1348/**
1349 * @brief Converts x from degrees to radians (per-component)
1350 */
1351using internal::radians;
1352
1353/**
1354 * @brief Returns the reciprocal of x (per-component)
1355 */
1356using internal::rcp;
1357
1358/**
1359 * @brief Returns a reflection vector using an incident ray and a surface normal
1360 */
1361using internal::reflect;
1362
1363/**
1364 * @brief Returns a refraction vector using an entering ray, a surface normal, and a refraction index
1365 */
1366using internal::refract;
1367
1368/**
1369 * @brief Rounds x to the nearest integer; halfway cases are rounded away from zero (per-component)
1370 */
1371using internal::round;
1372
1373/**
1374 * @brief Returns the reciprocal of the square root of x (per-component)
1375 */
1376using internal::rsqrt;
1377
1378/**
1379 * @brief Clamps x within the range [0, 1] (per-component)
1380 */
1381using internal::saturate;
1382
1383/**
1384 * @brief Returns the sign of x (per-component)
1385 */
1386using internal::sign;
1387
1388/**
1389 * @brief Returns the sine of x (per-component)
1390 */
1391using internal::sin;
1392
1393/**
1394 * @brief Returns the sine and cosine of x (per-component)
1395 */
1396using internal::sincos;
1397
1398/**
1399 * @brief Returns the hyperbolic sine of x (per-component)
1400 */
1401using internal::sinh;
1402
1403/**
1404 * @brief Returns a smooth Hermite interpolation between 0 and 1, if x is in the range [min, max] (per-component)
1405 */
1406using internal::smoothstep;
1407
1408/**
1409 * @brief Returns the square root of x (per-component)
1410 */
1411using internal::sqrt;
1412
1413/**
1414 * @brief Compares y and x, returning 0 or 1 based on which value is greater (per-component)
1415 */
1416using internal::step;
1417
1418/**
1419 * @brief Returns the tangent of x (per-component)
1420 */
1421using internal::tan;
1422
1423/**
1424 * @brief Returns the hyperbolic tangent of x (per-component)
1425 */
1426using internal::tanh;
1427
1428/**
1429 * @brief Transposes the specified input matrix
1430 */
1431using internal::transpose;
1432
1433/**
1434 * @brief Truncates x to the integer component (per-component)
1435 */
1436using internal::trunc;
1437}
1438
1439#endif
Linear algebra utilities.
Definition intrinsics.hpp:42
vector< std::int16_t, 3 > short3
3D short vector
Definition lin.hpp:131
matrix< std::int32_t, 2, 1 > int2x1
2x1 integer matrix
Definition lin.hpp:686
uint4 uint1x4
1x4 unsigned integer matrix
Definition lin.hpp:821
matrix< bool, 2, 1 > bool2x1
2x1 boolean matrix
Definition lin.hpp:286
float3 float1x3
1x3 float matrix
Definition lin.hpp:1041
matrix< double > double4x4
4x4 double matrix
Definition lin.hpp:1156
matrix< std::uint32_t > uint4x4
4x4 unsigned integer matrix
Definition lin.hpp:836
matrix< float, 4, 3 > float4x3
4x3 float matrix
Definition lin.hpp:1056
vector< std::uint64_t, 2 > ulong2
2D unsigned long vector
Definition lin.hpp:226
double2 double1x2
1x2 double matrix
Definition lin.hpp:1101
vector< std::uint64_t > ulong4
4D unsigned long vector
Definition lin.hpp:236
matrix< std::int64_t, 4, 1 > long4x1
4x1 long matrix
Definition lin.hpp:856
vector< std::int8_t, 3 > char3
3D char vector
Definition lin.hpp:91
matrix< std::uint64_t, 3, 3 > ulong3x3
3x3 unsigned long matrix
Definition lin.hpp:971
matrix< std::int64_t, 3 > long3x4
3x4 long matrix
Definition lin.hpp:911
matrix< std::int16_t, 4, 3 > short4x3
4x3 short matrix
Definition lin.hpp:576
vector< std::uint8_t > uchar4
4D unsigned char vector
Definition lin.hpp:116
matrix< float, 3, 1 > float3x1
3x1 float matrix
Definition lin.hpp:1011
matrix< std::uint8_t, 2, 3 > uchar2x3
2x3 unsigned char matrix
Definition lin.hpp:486
matrix< std::int32_t, 2, 2 > int2x2
2x2 integer matrix
Definition lin.hpp:706
matrix< float, 3, 2 > float3x2
3x2 float matrix
Definition lin.hpp:1031
uchar1 uchar1x1
1x1 unsigned char matrix
Definition lin.hpp:441
matrix< std::uint64_t, 2, 3 > ulong2x3
2x3 unsigned long matrix
Definition lin.hpp:966
vector< std::uint64_t, 1 > ulong1
1D unsigned long vector
Definition lin.hpp:221
matrix< std::uint32_t, 2, 3 > uint2x3
2x3 unsigned integer matrix
Definition lin.hpp:806
ulong3 ulong1x3
1x3 unsigned long matrix
Definition lin.hpp:961
matrix< std::int64_t, 3, 3 > long3x3
3x3 long matrix
Definition lin.hpp:891
vector< std::int8_t > char4
4D char vector
Definition lin.hpp:96
matrix< std::uint16_t, 4, 2 > ushort4x2
4x2 unsigned short matrix
Definition lin.hpp:636
matrix< std::uint64_t, 3, 2 > ulong3x2
3x2 unsigned long matrix
Definition lin.hpp:951
matrix< float, 3, 3 > float3x3
3x3 float matrix
Definition lin.hpp:1051
int1 int1x1
1x1 integer matrix
Definition lin.hpp:681
matrix< std::int16_t, 2, 3 > short2x3
2x3 short matrix
Definition lin.hpp:566
matrix< std::int16_t, 2, 2 > short2x2
2x2 short matrix
Definition lin.hpp:546
long2 long1x2
1x2 long matrix
Definition lin.hpp:861
vector< std::uint32_t, 1 > uint1
1D unsigned integer vector
Definition lin.hpp:181
matrix< std::uint16_t, 2, 1 > ushort2x1
2x1 unsigned short matrix
Definition lin.hpp:606
matrix< std::uint8_t, 4, 3 > uchar4x3
4x3 unsigned char matrix
Definition lin.hpp:496
long3 long1x3
1x3 long matrix
Definition lin.hpp:881
ulong1 ulong1x1
1x1 unsigned long matrix
Definition lin.hpp:921
matrix< std::int16_t, 2 > short2x4
2x4 short matrix
Definition lin.hpp:586
ushort2 ushort1x2
1x2 unsigned short matrix
Definition lin.hpp:621
matrix< std::uint16_t, 3, 2 > ushort3x2
3x2 unsigned short matrix
Definition lin.hpp:631
vector< double > double4
4D double vector
Definition lin.hpp:276
matrix< double, 3, 3 > double3x3
3x3 double matrix
Definition lin.hpp:1131
matrix< std::int32_t, 3, 3 > int3x3
3x3 integer matrix
Definition lin.hpp:731
matrix< std::uint8_t, 3, 3 > uchar3x3
3x3 unsigned char matrix
Definition lin.hpp:491
matrix< double, 2, 3 > double2x3
2x3 double matrix
Definition lin.hpp:1126
float2 float1x2
1x2 float matrix
Definition lin.hpp:1021
matrix< std::uint8_t, 4, 1 > uchar4x1
4x1 unsigned char matrix
Definition lin.hpp:456
matrix< std::uint64_t, 4, 3 > ulong4x3
4x3 unsigned long matrix
Definition lin.hpp:976
matrix< std::uint32_t, 2 > uint2x4
2x4 unsigned integer matrix
Definition lin.hpp:826
matrix< std::uint64_t, 3 > ulong3x4
3x4 unsigned long matrix
Definition lin.hpp:991
double3 double1x3
1x3 double matrix
Definition lin.hpp:1121
matrix< bool, 4, 1 > bool4x1
4x1 boolean matrix
Definition lin.hpp:296
matrix< std::uint32_t, 3, 3 > uint3x3
3x3 unsigned integer matrix
Definition lin.hpp:811
char3 char1x3
1x3 char matrix
Definition lin.hpp:401
char2 char1x2
1x2 char matrix
Definition lin.hpp:381
matrix< std::uint16_t, 3, 1 > ushort3x1
3x1 unsigned short matrix
Definition lin.hpp:611
vector< std::int64_t, 2 > long2
2D long vector
Definition lin.hpp:206
bool3 bool1x3
1x3 boolean matrix
Definition lin.hpp:321
matrix< std::uint64_t > ulong4x4
4x4 unsigned long matrix
Definition lin.hpp:996
matrix< std::int16_t, 3, 1 > short3x1
3x1 short matrix
Definition lin.hpp:531
matrix< std::int16_t, 4, 2 > short4x2
4x2 short matrix
Definition lin.hpp:556
matrix< std::int16_t, 4, 1 > short4x1
4x1 short matrix
Definition lin.hpp:536
short4 short1x4
1x4 short matrix
Definition lin.hpp:581
matrix< float, 2 > float2x4
2x4 float matrix
Definition lin.hpp:1066
int2 int1x2
1x2 integer matrix
Definition lin.hpp:701
matrix< std::uint8_t, 2, 2 > uchar2x2
2x2 unsigned char matrix
Definition lin.hpp:466
matrix< std::int32_t > int4x4
4x4 integer matrix
Definition lin.hpp:756
matrix< double, 4, 3 > double4x3
4x3 double matrix
Definition lin.hpp:1136
matrix< std::int16_t, 3, 2 > short3x2
3x2 short matrix
Definition lin.hpp:551
matrix< std::uint16_t, 4, 3 > ushort4x3
4x3 unsigned short matrix
Definition lin.hpp:656
matrix< std::int8_t, 2, 1 > char2x1
2x1 char matrix
Definition lin.hpp:366
float4 float1x4
1x4 float matrix
Definition lin.hpp:1061
double1 double1x1
1x1 double matrix
Definition lin.hpp:1081
matrix< T, 1, N > vector
Generic N-dimensional vector with per-component operations.
Definition lin.hpp:56
matrix< std::int8_t > char4x4
4x4 char matrix
Definition lin.hpp:436
matrix< std::int8_t, 2 > char2x4
2x4 char matrix
Definition lin.hpp:426
vector< std::int64_t > long4
4D long vector
Definition lin.hpp:216
matrix< std::uint32_t, 4, 2 > uint4x2
4x2 unsigned integer matrix
Definition lin.hpp:796
matrix< std::uint32_t, 3 > uint3x4
3x4 unsigned integer matrix
Definition lin.hpp:831
matrix< float, 4, 1 > float4x1
4x1 float matrix
Definition lin.hpp:1016
long1 long1x1
1x1 long matrix
Definition lin.hpp:841
bool2 bool1x2
1x2 boolean matrix
Definition lin.hpp:301
matrix< bool, 3 > bool3x4
3x4 boolean matrix
Definition lin.hpp:351
vector< std::uint16_t > ushort4
4D unsigned short vector
Definition lin.hpp:156
matrix< float, 2, 3 > float2x3
2x3 float matrix
Definition lin.hpp:1046
matrix< bool, 4, 3 > bool4x3
4x3 boolean matrix
Definition lin.hpp:336
ushort3 ushort1x3
1x3 unsigned short matrix
Definition lin.hpp:641
int4 int1x4
1x4 integer matrix
Definition lin.hpp:741
matrix< std::int64_t > long4x4
4x4 long matrix
Definition lin.hpp:916
matrix< std::int64_t, 4, 2 > long4x2
4x2 long matrix
Definition lin.hpp:876
matrix< std::uint32_t, 2, 1 > uint2x1
2x1 unsigned integer matrix
Definition lin.hpp:766
vector< bool, 3 > bool3
3D boolean vector
Definition lin.hpp:71
matrix< std::int16_t > short4x4
4x4 short matrix
Definition lin.hpp:596
matrix< std::int8_t, 3 > char3x4
3x4 char matrix
Definition lin.hpp:431
matrix< std::int32_t, 2 > int2x4
2x4 integer matrix
Definition lin.hpp:746
matrix< double, 3, 1 > double3x1
3x1 double matrix
Definition lin.hpp:1091
uint3 uint1x3
1x3 unsigned integer matrix
Definition lin.hpp:801
vector< std::int16_t, 2 > short2
2D short vector
Definition lin.hpp:126
float1 float1x1
1x1 float matrix
Definition lin.hpp:1001
ulong4 ulong1x4
1x4 unsigned long matrix
Definition lin.hpp:981
char1 char1x1
1x1 char matrix
Definition lin.hpp:361
matrix< std::int32_t, 3, 2 > int3x2
3x2 integer matrix
Definition lin.hpp:711
matrix< std::int64_t, 2 > long2x4
2x4 long matrix
Definition lin.hpp:906
matrix< double, 2, 1 > double2x1
2x1 double matrix
Definition lin.hpp:1086
matrix< std::int32_t, 4, 1 > int4x1
4x1 integer matrix
Definition lin.hpp:696
matrix< bool, 3, 2 > bool3x2
3x2 boolean matrix
Definition lin.hpp:311
vector< std::int16_t, 1 > short1
1D short vector
Definition lin.hpp:121
short2 short1x2
1x2 short matrix
Definition lin.hpp:541
matrix< std::int32_t, 3 > int3x4
3x4 integer matrix
Definition lin.hpp:751
vector< std::int64_t, 3 > long3
3D long vector
Definition lin.hpp:211
matrix< std::int8_t, 2, 3 > char2x3
2x3 char matrix
Definition lin.hpp:406
matrix< std::uint32_t, 4, 1 > uint4x1
4x1 unsigned integer matrix
Definition lin.hpp:776
vector< bool > bool4
4D boolean vector
Definition lin.hpp:76
vector< std::int32_t, 2 > int2
2D integer vector
Definition lin.hpp:166
short1 short1x1
1x1 short matrix
Definition lin.hpp:521
uint1 uint1x1
1x1 unsigned integer matrix
Definition lin.hpp:761
matrix< double, 2, 2 > double2x2
2x2 double matrix
Definition lin.hpp:1106
matrix< bool, 2, 2 > bool2x2
2x2 boolean matrix
Definition lin.hpp:306
matrix< float, 3 > float3x4
3x4 float matrix
Definition lin.hpp:1071
ushort4 ushort1x4
1x4 unsigned short matrix
Definition lin.hpp:661
uchar3 uchar1x3
1x3 unsigned char matrix
Definition lin.hpp:481
matrix< std::uint64_t, 2, 1 > ulong2x1
2x1 unsigned long matrix
Definition lin.hpp:926
matrix< std::uint16_t, 3 > ushort3x4
3x4 unsigned short matrix
Definition lin.hpp:671
matrix< float > float4x4
4x4 float matrix
Definition lin.hpp:1076
matrix< std::uint16_t, 2, 2 > ushort2x2
2x2 unsigned short matrix
Definition lin.hpp:626
vector< float, 1 > float1
1D float vector
Definition lin.hpp:241
vector< float, 3 > float3
3D float vector
Definition lin.hpp:251
matrix< double, 3 > double3x4
3x4 double matrix
Definition lin.hpp:1151
vector< double, 2 > double2
2D double vector
Definition lin.hpp:266
matrix< bool, 3, 3 > bool3x3
3x3 boolean matrix
Definition lin.hpp:331
vector< std::int32_t, 1 > int1
1D integer vector
Definition lin.hpp:161
vector< std::uint32_t > uint4
4D unsigned integer vector
Definition lin.hpp:196
matrix< std::int8_t, 4, 2 > char4x2
4x2 char matrix
Definition lin.hpp:396
matrix< double, 3, 2 > double3x2
3x2 double matrix
Definition lin.hpp:1111
matrix< double, 2 > double2x4
2x4 double matrix
Definition lin.hpp:1146
matrix< float, 2, 1 > float2x1
2x1 float matrix
Definition lin.hpp:1006
vector< std::uint8_t, 2 > uchar2
2D unsigned char vector
Definition lin.hpp:106
matrix< std::int32_t, 3, 1 > int3x1
3x1 integer matrix
Definition lin.hpp:691
matrix< std::uint8_t, 4, 2 > uchar4x2
4x2 unsigned char matrix
Definition lin.hpp:476
matrix< std::int32_t, 4, 2 > int4x2
4x2 integer matrix
Definition lin.hpp:716
matrix< std::uint32_t, 3, 2 > uint3x2
3x2 unsigned integer matrix
Definition lin.hpp:791
short3 short1x3
1x3 short matrix
Definition lin.hpp:561
matrix< float, 2, 2 > float2x2
2x2 float matrix
Definition lin.hpp:1026
char4 char1x4
1x4 char matrix
Definition lin.hpp:421
vector< std::uint16_t, 3 > ushort3
3D unsigned short vector
Definition lin.hpp:151
matrix< std::uint64_t, 4, 1 > ulong4x1
4x1 unsigned long matrix
Definition lin.hpp:936
matrix< std::uint8_t > uchar4x4
4x4 unsigned char matrix
Definition lin.hpp:516
matrix< std::int64_t, 3, 1 > long3x1
3x1 long matrix
Definition lin.hpp:851
vector< std::int8_t, 1 > char1
1D char vector
Definition lin.hpp:81
vector< std::uint16_t, 2 > ushort2
2D unsigned short vector
Definition lin.hpp:146
matrix< bool > bool4x4
4x4 boolean matrix
Definition lin.hpp:356
matrix< std::uint16_t, 4, 1 > ushort4x1
4x1 unsigned short matrix
Definition lin.hpp:616
matrix< std::int8_t, 4, 1 > char4x1
4x1 char matrix
Definition lin.hpp:376
matrix< std::int8_t, 2, 2 > char2x2
2x2 char matrix
Definition lin.hpp:386
vector< float, 2 > float2
2D float vector
Definition lin.hpp:246
uchar4 uchar1x4
1x4 unsigned char matrix
Definition lin.hpp:501
vector< std::int8_t, 2 > char2
2D char vector
Definition lin.hpp:86
matrix< std::int32_t, 2, 3 > int2x3
2x3 integer matrix
Definition lin.hpp:726
matrix< double, 4, 1 > double4x1
4x1 double matrix
Definition lin.hpp:1096
matrix< std::int8_t, 3, 2 > char3x2
3x2 char matrix
Definition lin.hpp:391
matrix< bool, 3, 1 > bool3x1
3x1 boolean matrix
Definition lin.hpp:291
matrix< bool, 4, 2 > bool4x2
4x2 boolean matrix
Definition lin.hpp:316
vector< std::uint16_t, 1 > ushort1
1D unsigned short vector
Definition lin.hpp:141
matrix< double, 4, 2 > double4x2
4x2 double matrix
Definition lin.hpp:1116
matrix< std::uint64_t, 3, 1 > ulong3x1
3x1 unsigned long matrix
Definition lin.hpp:931
matrix< float, 4, 2 > float4x2
4x2 float matrix
Definition lin.hpp:1036
internal::matrix< T, M, N > matrix
Generic M*N matrix with per-component operations.
Definition lin.hpp:48
matrix< std::int8_t, 3, 3 > char3x3
3x3 char matrix
Definition lin.hpp:411
vector< double, 3 > double3
3D double vector
Definition lin.hpp:271
matrix< std::int16_t, 3, 3 > short3x3
3x3 short matrix
Definition lin.hpp:571
vector< std::int32_t, 3 > int3
3D integer vector
Definition lin.hpp:171
matrix< std::uint16_t, 2 > ushort2x4
2x4 unsigned short matrix
Definition lin.hpp:666
matrix< std::uint32_t, 4, 3 > uint4x3
4x3 unsigned integer matrix
Definition lin.hpp:816
vector< std::int32_t > int4
4D integer vector
Definition lin.hpp:176
bool1 bool1x1
1x1 boolean matrix
Definition lin.hpp:281
matrix< std::int64_t, 3, 2 > long3x2
3x2 long matrix
Definition lin.hpp:871
matrix< std::int16_t, 3 > short3x4
3x4 short matrix
Definition lin.hpp:591
ulong2 ulong1x2
1x2 unsigned long matrix
Definition lin.hpp:941
matrix< std::uint16_t > ushort4x4
4x4 unsigned short matrix
Definition lin.hpp:676
int3 int1x3
1x3 integer matrix
Definition lin.hpp:721
vector< double, 1 > double1
1D double vector
Definition lin.hpp:261
matrix< std::uint16_t, 3, 3 > ushort3x3
3x3 unsigned short matrix
Definition lin.hpp:651
matrix< std::uint64_t, 2, 2 > ulong2x2
2x2 unsigned long matrix
Definition lin.hpp:946
matrix< std::int16_t, 2, 1 > short2x1
2x1 short matrix
Definition lin.hpp:526
uchar2 uchar1x2
1x2 unsigned char matrix
Definition lin.hpp:461
bool4 bool1x4
1x4 boolean matrix
Definition lin.hpp:341
matrix< std::int32_t, 4, 3 > int4x3
4x3 integer matrix
Definition lin.hpp:736
double4 double1x4
1x4 double matrix
Definition lin.hpp:1141
matrix< std::uint8_t, 3, 2 > uchar3x2
3x2 unsigned char matrix
Definition lin.hpp:471
uint2 uint1x2
1x2 unsigned integer matrix
Definition lin.hpp:781
matrix< bool, 2 > bool2x4
2x4 boolean matrix
Definition lin.hpp:346
matrix< std::uint16_t, 2, 3 > ushort2x3
2x3 unsigned short matrix
Definition lin.hpp:646
vector< std::uint8_t, 1 > uchar1
1D unsigned char vector
Definition lin.hpp:101
matrix< bool, 2, 3 > bool2x3
2x3 boolean matrix
Definition lin.hpp:326
matrix< std::uint32_t, 2, 2 > uint2x2
2x2 unsigned integer matrix
Definition lin.hpp:786
vector< bool, 2 > bool2
2D boolean vector
Definition lin.hpp:66
vector< float > float4
4D float vector
Definition lin.hpp:256
vector< bool, 1 > bool1
1D boolean vector
Definition lin.hpp:61
vector< std::int64_t, 1 > long1
1D long vector
Definition lin.hpp:201
long4 long1x4
1x4 long matrix
Definition lin.hpp:901
matrix< std::int64_t, 2, 1 > long2x1
2x1 long matrix
Definition lin.hpp:846
matrix< std::int64_t, 2, 3 > long2x3
2x3 long matrix
Definition lin.hpp:886
matrix< std::uint32_t, 3, 1 > uint3x1
3x1 unsigned integer matrix
Definition lin.hpp:771
matrix< std::int64_t, 4, 3 > long4x3
4x3 long matrix
Definition lin.hpp:896
matrix< std::int8_t, 3, 1 > char3x1
3x1 char matrix
Definition lin.hpp:371
matrix< std::uint64_t, 2 > ulong2x4
2x4 unsigned long matrix
Definition lin.hpp:986
matrix< std::int64_t, 2, 2 > long2x2
2x2 long matrix
Definition lin.hpp:866
matrix< std::uint64_t, 4, 2 > ulong4x2
4x2 unsigned long matrix
Definition lin.hpp:956
vector< std::int16_t > short4
4D short vector
Definition lin.hpp:136
matrix< std::uint8_t, 3, 1 > uchar3x1
3x1 unsigned char matrix
Definition lin.hpp:451
ushort1 ushort1x1
1x1 unsigned short matrix
Definition lin.hpp:601
matrix< std::uint8_t, 2 > uchar2x4
2x4 unsigned char matrix
Definition lin.hpp:506
matrix< std::uint8_t, 2, 1 > uchar2x1
2x1 unsigned char matrix
Definition lin.hpp:446
matrix< std::uint8_t, 3 > uchar3x4
3x4 unsigned char matrix
Definition lin.hpp:511
matrix< std::int8_t, 4, 3 > char4x3
4x3 char matrix
Definition lin.hpp:416
vector< std::uint8_t, 3 > uchar3
3D unsigned char vector
Definition lin.hpp:111
vector< std::uint32_t, 3 > uint3
3D unsigned integer vector
Definition lin.hpp:191
vector< std::uint32_t, 2 > uint2
2D unsigned integer vector
Definition lin.hpp:186
vector< std::uint64_t, 3 > ulong3
3D unsigned long vector
Definition lin.hpp:231