X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2FMoof%2Fcml%2Fvector%2Fvector_ops.h;fp=src%2FMoof%2Fcml%2Fvector%2Fvector_ops.h;h=e7920d1c8a33e381ce059210a5cf5eb31980f4ed;hb=c2321281bf12a7efaedde930422c7ddbc92080d4;hp=0000000000000000000000000000000000000000;hpb=87bc17e55b0c1dc73ecc66df856d3f08fd7a7724;p=chaz%2Fyoink diff --git a/src/Moof/cml/vector/vector_ops.h b/src/Moof/cml/vector/vector_ops.h new file mode 100644 index 0000000..e7920d1 --- /dev/null +++ b/src/Moof/cml/vector/vector_ops.h @@ -0,0 +1,51 @@ +/* -*- C++ -*- ------------------------------------------------------------ + +Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/ + +The Configurable Math Library (CML) is distributed under the terms of the +Boost Software License, v1.0 (see cml/LICENSE for details). + + *-----------------------------------------------------------------------*/ +/** @file + * @brief Defines vector operators. + */ + +#ifndef vector_ops_h +#define vector_ops_h + +#include +#include +#include + +namespace cml { + +CML_VEC_UNIOP( operator+, et::OpPos) +CML_VECXPR_UNIOP( operator+, et::OpPos) + +CML_VEC_UNIOP( operator-, et::OpNeg) +CML_VECXPR_UNIOP( operator-, et::OpNeg) + +CML_VEC_VEC_BINOP( operator+, et::OpAdd) +CML_VECXPR_VEC_BINOP( operator+, et::OpAdd) +CML_VEC_VECXPR_BINOP( operator+, et::OpAdd) +CML_VECXPR_VECXPR_BINOP( operator+, et::OpAdd) + +CML_VEC_VEC_BINOP( operator-, et::OpSub) +CML_VECXPR_VEC_BINOP( operator-, et::OpSub) +CML_VEC_VECXPR_BINOP( operator-, et::OpSub) +CML_VECXPR_VECXPR_BINOP( operator-, et::OpSub) + +CML_VEC_SCALAR_BINOP( operator*, et::OpMul) +CML_SCALAR_VEC_BINOP( operator*, et::OpMul) +CML_VECXPR_SCALAR_BINOP( operator*, et::OpMul) +CML_SCALAR_VECXPR_BINOP( operator*, et::OpMul) + +CML_VEC_SCALAR_BINOP( operator/, et::OpDiv) +CML_VECXPR_SCALAR_BINOP( operator/, et::OpDiv) + +} // namespace cml + +#endif + +// ------------------------------------------------------------------------- +// vim:ft=cpp