| 34 | 
  | 
#ifndef MATH_RECTMATRIX_HPP | 
| 35 | 
  | 
#define MATH_RECTMATRIX_HPP | 
| 36 | 
  | 
 | 
| 37 | 
+ | 
#include <cmath> | 
| 38 | 
  | 
#include "Vector.hpp" | 
| 39 | 
  | 
 | 
| 40 | 
  | 
namespace oopse { | 
| 40 | 
– | 
 | 
| 41 | 
– | 
    template<typename T> | 
| 42 | 
– | 
    inline bool equal(T e1, T e2) { | 
| 43 | 
– | 
        return e1 == e2; | 
| 44 | 
– | 
    } | 
| 45 | 
– | 
 | 
| 46 | 
– | 
    template<> | 
| 47 | 
– | 
    inline bool equal(float e1, float e2) { | 
| 48 | 
– | 
        return e1 == e2; | 
| 49 | 
– | 
    } | 
| 50 | 
– | 
 | 
| 51 | 
– | 
    template<> | 
| 52 | 
– | 
    inline bool equal(double e1, double e2) { | 
| 53 | 
– | 
        return e1 == e2; | 
| 54 | 
– | 
    } | 
| 41 | 
  | 
 | 
| 42 | 
  | 
    /** | 
| 43 | 
  | 
     * @class RectMatrix RectMatrix.hpp "math/RectMatrix.hpp" | 
| 412 | 
  | 
            for (unsigned int i = 0; i < Row; i++) | 
| 413 | 
  | 
                for (unsigned int j = 0; j < Col; j++) | 
| 414 | 
  | 
                    for (unsigned int k = 0; k < SameDim; k++) | 
| 415 | 
< | 
                        result(i, j)  = m1(i, k) * m2(k, j);                 | 
| 415 | 
> | 
                        result(i, j)  += m1(i, k) * m2(k, j);                 | 
| 416 | 
  | 
 | 
| 417 | 
  | 
        return result; | 
| 418 | 
  | 
    } |