]> Dogcows Code - chaz/yoink/blob - src/cml/vector/vector_ops.h
now using cml for vectors and math stuff
[chaz/yoink] / src / cml / vector / vector_ops.h
1 /* -*- C++ -*- ------------------------------------------------------------
2
3 Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/
4
5 The Configurable Math Library (CML) is distributed under the terms of the
6 Boost Software License, v1.0 (see cml/LICENSE for details).
7
8 *-----------------------------------------------------------------------*/
9 /** @file
10 * @brief Defines vector operators.
11 */
12
13 #ifndef vector_ops_h
14 #define vector_ops_h
15
16 #include <cml/et/scalar_ops.h>
17 #include <cml/vector/vector_expr.h>
18 #include <cml/vector/vecop_macros.h>
19
20 namespace cml {
21
22 CML_VEC_UNIOP( operator+, et::OpPos)
23 CML_VECXPR_UNIOP( operator+, et::OpPos)
24
25 CML_VEC_UNIOP( operator-, et::OpNeg)
26 CML_VECXPR_UNIOP( operator-, et::OpNeg)
27
28 CML_VEC_VEC_BINOP( operator+, et::OpAdd)
29 CML_VECXPR_VEC_BINOP( operator+, et::OpAdd)
30 CML_VEC_VECXPR_BINOP( operator+, et::OpAdd)
31 CML_VECXPR_VECXPR_BINOP( operator+, et::OpAdd)
32
33 CML_VEC_VEC_BINOP( operator-, et::OpSub)
34 CML_VECXPR_VEC_BINOP( operator-, et::OpSub)
35 CML_VEC_VECXPR_BINOP( operator-, et::OpSub)
36 CML_VECXPR_VECXPR_BINOP( operator-, et::OpSub)
37
38 CML_VEC_SCALAR_BINOP( operator*, et::OpMul)
39 CML_SCALAR_VEC_BINOP( operator*, et::OpMul)
40 CML_VECXPR_SCALAR_BINOP( operator*, et::OpMul)
41 CML_SCALAR_VECXPR_BINOP( operator*, et::OpMul)
42
43 CML_VEC_SCALAR_BINOP( operator/, et::OpDiv)
44 CML_VECXPR_SCALAR_BINOP( operator/, et::OpDiv)
45
46 } // namespace cml
47
48 #endif
49
50 // -------------------------------------------------------------------------
51 // vim:ft=cpp
This page took 0.030412 seconds and 4 git commands to generate.