~mir-team/mir/in-process-egl+input-conglomeration

« back to all changes in this revision

Viewing changes to 3rd_party/glm/glm/core/type_mat2x3.inl

Merged trunk and fixed issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
///////////////////////////////////////////////////////////////////////////////////
2
 
/// OpenGL Mathematics (glm.g-truc.net)
3
 
///
4
 
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5
 
/// Permission is hereby granted, free of charge, to any person obtaining a copy
6
 
/// of this software and associated documentation files (the "Software"), to deal
7
 
/// in the Software without restriction, including without limitation the rights
8
 
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
 
/// copies of the Software, and to permit persons to whom the Software is
10
 
/// furnished to do so, subject to the following conditions:
11
 
/// 
12
 
/// The above copyright notice and this permission notice shall be included in
13
 
/// all copies or substantial portions of the Software.
14
 
/// 
15
 
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
 
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
 
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
 
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
 
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
 
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
 
/// THE SOFTWARE.
22
 
///
23
 
/// @ref core
24
 
/// @file glm/core/type_mat2x3.inl
25
 
/// @date 2006-08-05 / 2011-06-15
26
 
/// @author Christophe Riccio
27
 
///////////////////////////////////////////////////////////////////////////////////
28
 
 
29
 
namespace glm{
30
 
namespace detail
31
 
{
32
 
    template <typename T>
33
 
    GLM_FUNC_QUALIFIER typename tmat2x3<T>::size_type tmat2x3<T>::length() const
34
 
    {
35
 
        return 2;
36
 
    }
37
 
 
38
 
        template <typename T>
39
 
        GLM_FUNC_QUALIFIER typename tmat2x3<T>::size_type tmat2x3<T>::col_size()
40
 
        {
41
 
                return 3;
42
 
        }
43
 
 
44
 
        template <typename T>
45
 
        GLM_FUNC_QUALIFIER typename tmat2x3<T>::size_type tmat2x3<T>::row_size()
46
 
        {
47
 
                return 2;
48
 
        }
49
 
 
50
 
        //////////////////////////////////////
51
 
        // Accesses
52
 
 
53
 
        template <typename T>
54
 
        GLM_FUNC_QUALIFIER typename tmat2x3<T>::col_type &
55
 
        tmat2x3<T>::operator[]
56
 
        (
57
 
                size_type i
58
 
        )
59
 
        {
60
 
                assert(i < this->length());
61
 
                return this->value[i];
62
 
        }
63
 
 
64
 
        template <typename T>
65
 
        GLM_FUNC_QUALIFIER typename tmat2x3<T>::col_type const &
66
 
        tmat2x3<T>::operator[]
67
 
        (
68
 
                size_type i
69
 
        ) const
70
 
        {
71
 
                assert(i < this->length());
72
 
                return this->value[i];
73
 
        }
74
 
 
75
 
    //////////////////////////////////////////////////////////////
76
 
    // Constructors
77
 
 
78
 
    template <typename T> 
79
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3()
80
 
    {
81
 
        this->value[0] = col_type(T(1), T(0), T(0));
82
 
        this->value[1] = col_type(T(0), T(1), T(0));
83
 
    }
84
 
 
85
 
    template <typename T> 
86
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
87
 
        (
88
 
                tmat2x3<T> const & m
89
 
        )
90
 
    {
91
 
        this->value[0] = m.value[0];
92
 
        this->value[1] = m.value[1];
93
 
    }
94
 
 
95
 
    template <typename T> 
96
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
97
 
        (
98
 
                ctor
99
 
        )
100
 
    {}
101
 
 
102
 
    template <typename T> 
103
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
104
 
        (
105
 
                value_type const & s
106
 
        )
107
 
    {
108
 
        this->value[0] = col_type(s, T(0), T(0));
109
 
        this->value[1] = col_type(T(0), s, T(0));
110
 
    }
111
 
 
112
 
    template <typename T> 
113
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
114
 
    (
115
 
        value_type const & x0, value_type const & y0, value_type const & z0,
116
 
        value_type const & x1, value_type const & y1, value_type const & z1
117
 
    )
118
 
    {
119
 
        this->value[0] = col_type(x0, y0, z0);
120
 
        this->value[1] = col_type(x1, y1, z1);
121
 
    }
122
 
 
123
 
    template <typename T> 
124
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
125
 
    (
126
 
        col_type const & v0, 
127
 
        col_type const & v1
128
 
    )
129
 
    {
130
 
        this->value[0] = v0;
131
 
        this->value[1] = v1;
132
 
    }
133
 
 
134
 
        //////////////////////////////////////
135
 
        // Convertion constructors
136
 
        template <typename T> 
137
 
        template <typename U> 
138
 
        GLM_FUNC_DECL tmat2x3<T>::tmat2x3
139
 
        (
140
 
                U const & s
141
 
        )
142
 
        {
143
 
                value_type const Zero(0);
144
 
        this->value[0] = tvec3<T>(value_type(s), Zero, Zero);
145
 
        this->value[1] = tvec3<T>(Zero, value_type(s), Zero);
146
 
        }
147
 
        
148
 
        template <typename T> 
149
 
        template <
150
 
                typename X1, typename Y1, typename Z1, 
151
 
                typename X2, typename Y2, typename Z2> 
152
 
        GLM_FUNC_DECL tmat2x3<T>::tmat2x3
153
 
        (
154
 
                X1 const & x1, Y1 const & y1, Z1 const & z1, 
155
 
                X2 const & x2, Y2 const & y2, Z2 const & z2
156
 
        )               
157
 
        {
158
 
        this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1));
159
 
        this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2));
160
 
        }
161
 
        
162
 
        template <typename T> 
163
 
        template <typename V1, typename V2> 
164
 
        GLM_FUNC_DECL tmat2x3<T>::tmat2x3
165
 
        (
166
 
                tvec3<V1> const & v1, 
167
 
                tvec3<V2> const & v2
168
 
        )               
169
 
        {
170
 
        this->value[0] = col_type(v1);
171
 
        this->value[1] = col_type(v2);
172
 
        }
173
 
 
174
 
        //////////////////////////////////////
175
 
    // Matrix conversions
176
 
    
177
 
    template <typename T> 
178
 
    template <typename U> 
179
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
180
 
        (
181
 
                tmat2x3<U> const & m
182
 
        )
183
 
    {
184
 
        this->value[0] = col_type(m[0]);
185
 
        this->value[1] = col_type(m[1]);
186
 
        }
187
 
 
188
 
    template <typename T> 
189
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
190
 
        (
191
 
                tmat2x2<T> const & m
192
 
        )
193
 
    {
194
 
        this->value[0] = col_type(m[0], T(0));
195
 
        this->value[1] = col_type(m[1], T(0));
196
 
    }
197
 
 
198
 
    template <typename T> 
199
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
200
 
        (
201
 
                tmat3x3<T> const & m
202
 
        )
203
 
    {
204
 
        this->value[0] = col_type(m[0]);
205
 
        this->value[1] = col_type(m[1]);
206
 
    }
207
 
 
208
 
    template <typename T> 
209
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
210
 
        (
211
 
                tmat4x4<T> const & m
212
 
        )
213
 
    {
214
 
        this->value[0] = col_type(m[0]);
215
 
        this->value[1] = col_type(m[1]);
216
 
    }
217
 
 
218
 
    template <typename T> 
219
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
220
 
        (
221
 
                tmat2x4<T> const & m
222
 
        )
223
 
    {
224
 
        this->value[0] = col_type(m[0]);
225
 
        this->value[1] = col_type(m[1]);
226
 
    }
227
 
 
228
 
    template <typename T> 
229
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
230
 
        (
231
 
                tmat3x2<T> const & m
232
 
        )
233
 
    {
234
 
        this->value[0] = col_type(m[0], T(0));
235
 
        this->value[1] = col_type(m[1], T(0));
236
 
    }
237
 
 
238
 
    template <typename T> 
239
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
240
 
        (
241
 
                tmat3x4<T> const & m
242
 
        )
243
 
    {
244
 
        this->value[0] = col_type(m[0]);
245
 
        this->value[1] = col_type(m[1]);
246
 
    }
247
 
 
248
 
    template <typename T> 
249
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
250
 
        (
251
 
                tmat4x2<T> const & m
252
 
        )
253
 
    {
254
 
        this->value[0] = col_type(m[0], T(0));
255
 
        this->value[1] = col_type(m[1], T(0));
256
 
    }
257
 
 
258
 
    template <typename T> 
259
 
    GLM_FUNC_QUALIFIER tmat2x3<T>::tmat2x3
260
 
        (
261
 
                tmat4x3<T> const & m
262
 
        )
263
 
    {
264
 
        this->value[0] = m[0];
265
 
        this->value[1] = m[1];
266
 
    }
267
 
 
268
 
    //////////////////////////////////////////////////////////////
269
 
    // Unary updatable operators
270
 
 
271
 
    template <typename T> 
272
 
    GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator= 
273
 
        (
274
 
                tmat2x3<T> const & m
275
 
        )
276
 
    {
277
 
        this->value[0] = m[0];
278
 
        this->value[1] = m[1];
279
 
        return *this;
280
 
    }
281
 
 
282
 
    template <typename T> 
283
 
        template <typename U> 
284
 
    GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator= 
285
 
        (
286
 
                tmat2x3<U> const & m
287
 
        )
288
 
    {
289
 
        this->value[0] = m[0];
290
 
        this->value[1] = m[1];
291
 
        return *this;
292
 
    }
293
 
 
294
 
    template <typename T> 
295
 
        template <typename U> 
296
 
    GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator+= 
297
 
        (
298
 
                U const & s
299
 
        )
300
 
    {
301
 
        this->value[0] += s;
302
 
        this->value[1] += s;
303
 
        return *this;
304
 
    }
305
 
 
306
 
    template <typename T> 
307
 
        template <typename U> 
308
 
    GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator+=
309
 
        (
310
 
                tmat2x3<U> const & m
311
 
        )
312
 
    {
313
 
        this->value[0] += m[0];
314
 
        this->value[1] += m[1];
315
 
        return *this;
316
 
    }
317
 
 
318
 
    template <typename T> 
319
 
        template <typename U> 
320
 
    GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator-= 
321
 
        (
322
 
                U const & s
323
 
        )
324
 
    {
325
 
        this->value[0] -= s;
326
 
        this->value[1] -= s;
327
 
        return *this;
328
 
    }
329
 
 
330
 
    template <typename T> 
331
 
        template <typename U> 
332
 
    GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator-= 
333
 
        (
334
 
                tmat2x3<U> const & m
335
 
        )
336
 
    {
337
 
        this->value[0] -= m[0];
338
 
        this->value[1] -= m[1];
339
 
        return *this;
340
 
    }
341
 
 
342
 
    template <typename T> 
343
 
        template <typename U> 
344
 
    GLM_FUNC_QUALIFIER tmat2x3<T>& tmat2x3<T>::operator*= 
345
 
        (
346
 
                U const & s
347
 
        )
348
 
    {
349
 
        this->value[0] *= s;
350
 
        this->value[1] *= s;
351
 
        return *this;
352
 
    }
353
 
 
354
 
    template <typename T> 
355
 
        template <typename U> 
356
 
    GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator*= 
357
 
        (
358
 
                tmat2x3<U> const & m
359
 
        )
360
 
    {
361
 
        return (*this = tmat2x3<U>(*this * m));
362
 
    }
363
 
 
364
 
    template <typename T>
365
 
        template <typename U> 
366
 
    GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator/= 
367
 
        (
368
 
                U const & s
369
 
        )
370
 
    {
371
 
        this->value[0] /= s;
372
 
        this->value[1] /= s;
373
 
        return *this;
374
 
    }
375
 
 
376
 
    template <typename T> 
377
 
    GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator++ ()
378
 
    {
379
 
        ++this->value[0];
380
 
        ++this->value[1];
381
 
        return *this;
382
 
    }
383
 
 
384
 
    template <typename T> 
385
 
    GLM_FUNC_QUALIFIER tmat2x3<T> & tmat2x3<T>::operator-- ()
386
 
    {
387
 
        --this->value[0];
388
 
        --this->value[1];
389
 
        return *this;
390
 
    }
391
 
    
392
 
    //////////////////////////////////////////////////////////////
393
 
    // Binary operators
394
 
 
395
 
    template <typename T> 
396
 
    GLM_FUNC_QUALIFIER tmat2x3<T> operator+ 
397
 
        (
398
 
                tmat2x3<T> const & m, 
399
 
                typename tmat2x3<T>::value_type const & s
400
 
        )
401
 
    {
402
 
        return tmat2x3<T>(
403
 
            m[0] + s,
404
 
            m[1] + s);
405
 
    }
406
 
 
407
 
    template <typename T> 
408
 
    GLM_FUNC_QUALIFIER tmat2x3<T> operator+ 
409
 
        (
410
 
                tmat2x3<T> const & m1, 
411
 
                tmat2x3<T> const & m2
412
 
        )
413
 
    {
414
 
        return tmat2x3<T>(
415
 
            m1[0] + m2[0],
416
 
            m1[1] + m2[1]);
417
 
    }
418
 
 
419
 
    template <typename T> 
420
 
    GLM_FUNC_QUALIFIER tmat2x3<T> operator- 
421
 
        (
422
 
                tmat2x3<T> const & m, 
423
 
                typename tmat2x3<T>::value_type const & s
424
 
        )
425
 
    {
426
 
        return tmat2x3<T>(
427
 
            m[0] - s,
428
 
            m[1] - s);
429
 
    }
430
 
 
431
 
    template <typename T> 
432
 
    GLM_FUNC_QUALIFIER tmat2x3<T> operator- 
433
 
        (
434
 
                tmat2x3<T> const & m1, 
435
 
                tmat2x3<T> const & m2
436
 
        )
437
 
    {
438
 
        return tmat2x3<T>(
439
 
            m1[0] - m2[0],
440
 
            m1[1] - m2[1]);
441
 
    }
442
 
 
443
 
    template <typename T> 
444
 
    GLM_FUNC_QUALIFIER tmat2x3<T> operator* 
445
 
        (
446
 
                tmat2x3<T> const & m, 
447
 
                typename tmat2x3<T>::value_type const & s
448
 
        )
449
 
    {
450
 
        return tmat2x3<T>(
451
 
            m[0] * s,
452
 
            m[1] * s);
453
 
    }
454
 
 
455
 
    template <typename T> 
456
 
    GLM_FUNC_QUALIFIER tmat2x3<T> operator* 
457
 
        (
458
 
                typename tmat2x3<T>::value_type const & s, 
459
 
                tmat2x3<T> const & m
460
 
        )
461
 
    {
462
 
        return tmat2x3<T>(
463
 
            m[0] * s,
464
 
            m[1] * s);
465
 
    }
466
 
 
467
 
    template <typename T>
468
 
    GLM_FUNC_QUALIFIER typename tmat2x3<T>::col_type operator* 
469
 
        (
470
 
                tmat2x3<T> const & m, 
471
 
                typename tmat2x3<T>::row_type const & v)
472
 
    {
473
 
        return typename tmat2x3<T>::col_type(
474
 
            m[0][0] * v.x + m[1][0] * v.y,
475
 
            m[0][1] * v.x + m[1][1] * v.y,
476
 
            m[0][2] * v.x + m[1][2] * v.y);
477
 
    }
478
 
 
479
 
    template <typename T> 
480
 
    GLM_FUNC_QUALIFIER typename tmat2x3<T>::row_type operator* 
481
 
        (
482
 
                typename tmat2x3<T>::col_type const & v, 
483
 
                tmat2x3<T> const & m) 
484
 
    {
485
 
        return typename tmat2x3<T>::row_type(
486
 
            v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],
487
 
            v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]);
488
 
    }
489
 
 
490
 
        template <typename T>
491
 
        GLM_FUNC_QUALIFIER tmat2x3<T> operator* 
492
 
        (
493
 
                tmat2x3<T> const & m1, 
494
 
                tmat2x2<T> const & m2
495
 
        )
496
 
        {
497
 
                return tmat2x3<T>(
498
 
                        m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
499
 
                        m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
500
 
                        m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
501
 
                        m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
502
 
                        m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],
503
 
                        m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1]);
504
 
        }
505
 
 
506
 
    template <typename T> 
507
 
    GLM_FUNC_QUALIFIER tmat3x3<T> operator* 
508
 
        (
509
 
                tmat2x3<T> const & m1, 
510
 
                tmat3x2<T> const & m2
511
 
        )
512
 
    {
513
 
                typename tmat2x3<T>::value_type SrcA00 = m1[0][0];
514
 
                typename tmat2x3<T>::value_type SrcA01 = m1[0][1];
515
 
                typename tmat2x3<T>::value_type SrcA02 = m1[0][2];
516
 
                typename tmat2x3<T>::value_type SrcA10 = m1[1][0];
517
 
                typename tmat2x3<T>::value_type SrcA11 = m1[1][1];
518
 
                typename tmat2x3<T>::value_type SrcA12 = m1[1][2];
519
 
 
520
 
                typename tmat2x3<T>::value_type SrcB00 = m2[0][0];
521
 
                typename tmat2x3<T>::value_type SrcB01 = m2[0][1];
522
 
                typename tmat2x3<T>::value_type SrcB10 = m2[1][0];
523
 
                typename tmat2x3<T>::value_type SrcB11 = m2[1][1];
524
 
                typename tmat2x3<T>::value_type SrcB20 = m2[2][0];
525
 
                typename tmat2x3<T>::value_type SrcB21 = m2[2][1];
526
 
 
527
 
                tmat3x3<T> Result(tmat3x3<T>::null);
528
 
                Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;
529
 
                Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;
530
 
                Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;
531
 
                Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11;
532
 
                Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11;
533
 
                Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11;
534
 
                Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21;
535
 
                Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21;
536
 
                Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21;
537
 
                return Result;
538
 
    }
539
 
 
540
 
        template <typename T>
541
 
        GLM_FUNC_QUALIFIER tmat4x3<T> operator* 
542
 
        (
543
 
                tmat2x3<T> const & m1, 
544
 
                tmat4x2<T> const & m2
545
 
        )
546
 
        {
547
 
                return tmat4x3<T>(
548
 
                        m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
549
 
                        m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],
550
 
                        m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],
551
 
                        m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],
552
 
                        m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],
553
 
                        m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],
554
 
                        m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],
555
 
                        m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],
556
 
                        m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1],
557
 
                        m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1],
558
 
                        m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1],
559
 
                        m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]);
560
 
        }
561
 
 
562
 
    template <typename T> 
563
 
    GLM_FUNC_QUALIFIER tmat2x3<T> operator/ 
564
 
        (
565
 
                tmat2x3<T> const & m, 
566
 
                typename tmat2x3<T>::value_type const & s
567
 
        )
568
 
    {
569
 
        return tmat2x3<T>(
570
 
            m[0] / s,
571
 
            m[1] / s);        
572
 
    }
573
 
 
574
 
    template <typename T> 
575
 
    GLM_FUNC_QUALIFIER tmat2x3<T> operator/ 
576
 
        (
577
 
                typename tmat2x3<T>::value_type const & s, 
578
 
                tmat2x3<T> const & m
579
 
        )
580
 
    {
581
 
        return tmat2x3<T>(
582
 
            s / m[0],
583
 
            s / m[1]);        
584
 
    }
585
 
 
586
 
        // Unary constant operators
587
 
    template <typename T> 
588
 
    GLM_FUNC_QUALIFIER tmat2x3<T> const operator- 
589
 
        (
590
 
                tmat2x3<T> const & m
591
 
        )
592
 
    {
593
 
        return tmat2x3<T>(
594
 
            -m[0], 
595
 
            -m[1]);
596
 
    }
597
 
 
598
 
    template <typename T> 
599
 
    GLM_FUNC_QUALIFIER tmat2x3<T> const operator++ 
600
 
        (
601
 
                tmat2x3<T> const & m, 
602
 
                int
603
 
        ) 
604
 
    {
605
 
        return tmat2x3<T>(
606
 
            m[0] + typename tmat2x3<T>::value_type(1),
607
 
            m[1] + typename tmat2x3<T>::value_type(1));
608
 
    }
609
 
 
610
 
    template <typename T> 
611
 
    GLM_FUNC_QUALIFIER tmat2x3<T> const operator-- 
612
 
        (
613
 
                tmat2x3<T> const & m, 
614
 
                int
615
 
        ) 
616
 
    {
617
 
        return tmat2x3<T>(
618
 
            m[0] - typename tmat2x3<T>::value_type(1),
619
 
            m[1] - typename tmat2x3<T>::value_type(1));
620
 
    }
621
 
 
622
 
        //////////////////////////////////////
623
 
        // Boolean operators
624
 
 
625
 
        template <typename T> 
626
 
        GLM_FUNC_QUALIFIER bool operator==
627
 
        (
628
 
                tmat2x3<T> const & m1, 
629
 
                tmat2x3<T> const & m2
630
 
        )
631
 
        {
632
 
                return (m1[0] == m2[0]) && (m1[1] == m2[1]);
633
 
        }
634
 
 
635
 
        template <typename T> 
636
 
        GLM_FUNC_QUALIFIER bool operator!=
637
 
        (
638
 
                tmat2x3<T> const & m1, 
639
 
                tmat2x3<T> const & m2
640
 
        )
641
 
        {
642
 
                return (m1[0] != m2[0]) || (m1[1] != m2[1]);
643
 
        }
644
 
 
645
 
} //namespace detail
646
 
} //namespace glm