From 5487719b70fa89fdffae413b2d00f2a928cfc2a7 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 26 Oct 2015 13:19:01 +0100 Subject: ucoo/math: add quaternion for vector rotation --- ucoo/math/yaw_pitch_roll.tcc | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 ucoo/math/yaw_pitch_roll.tcc (limited to 'ucoo/math/yaw_pitch_roll.tcc') diff --git a/ucoo/math/yaw_pitch_roll.tcc b/ucoo/math/yaw_pitch_roll.tcc new file mode 100644 index 0000000..e2b8764 --- /dev/null +++ b/ucoo/math/yaw_pitch_roll.tcc @@ -0,0 +1,44 @@ +#ifndef ucoo_math_yaw_pitch_roll_tcc +#define ucoo_math_yaw_pitch_roll_tcc +// ucoolib - Microcontroller object oriented library. {{{ +// +// Copyright (C) 2015 Nicolas Schodet +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// +// }}} + +namespace ucoo { + +template +constexpr +YawPitchRoll::YawPitchRoll () +{ +} + +template +constexpr +YawPitchRoll::YawPitchRoll (T yaw_, T pitch_, T roll_) + : yaw (yaw_), pitch (pitch_), roll (roll_) +{ +} + +} // namespace ucoo + +#endif // ucoo_math_yaw_pitch_roll_tcc -- cgit v1.2.3