2 ******************************************************************************
3 * @addtogroup OpenPilot Math Utilities
5 * @addtogroup Reuseable vector data type and functions
9 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2015.
10 * @brief Reuseable vector data type and functions
12 * @see The GNU Public License (GPL) Version 3
14 *****************************************************************************/
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 3 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful, but
22 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
26 * You should have received a copy of the GNU General Public License along
27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
37 #define DECLAREVECTOR3(suffix, datatype) \
38 typedef struct Vector3##suffix##_t { \
44 #define DECLAREVECTOR2(suffix, datatype) \
45 typedef struct Vector2##suffix##_t { \
51 DECLAREVECTOR3(i16
, int16_t);
52 DECLAREVECTOR3(i32
, int32_t);
53 DECLAREVECTOR3(u16
, uint16_t);
54 DECLAREVECTOR3(u32
, uint32_t);
55 DECLAREVECTOR3(f
, float);
57 DECLAREVECTOR2(i16
, int16_t);
58 DECLAREVECTOR2(i32
, int32_t);
59 DECLAREVECTOR2(u16
, uint16_t);
60 DECLAREVECTOR2(u32
, uint32_t);
61 DECLAREVECTOR2(f
, float);
63 #endif /* VECTORS_H_ */