/** * @file Scalar.hpp * * Defines conversion of matrix to scalar. * * @author James Goppert */ #pragma once #include #include #include #include #include #include "math.hpp" namespace matrix { template class Scalar { public: virtual ~Scalar() {}; Scalar() : _value() { } Scalar(const Matrix & other) { _value = other(0,0); } Scalar(float other) { _value = other; } operator Type() { return _value; } private: Type _value; }; typedef Scalar Scalarf; } // namespace matrix /* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */