rotgen/test/unit/quaternion/basic_api.cpp
Joel Falcou c400650f1a Implements rotgen::quaternion
Closes #19

Co-authored-by: Jules Pénuchot <jules@penuchot.com>
2025-11-09 19:07:20 +01:00

28 lines
760 B
C++

//==============================================================================
/*
ROTGEN - Runtime Overlay for Eigen
Copyright : CODE RECKONS
SPDX-License-Identifier: BSL-1.0
*/
//==============================================================================
#include <rotgen/rotgen.hpp>
#include "unit/tests.hpp"
TTS_CASE_TPL("Test coefficient accessors",
float,
double)<typename Scalar>(tts::type<Scalar>)
{
rotgen::quaternion<Scalar> quaterion;
quaterion.w() = 1;
quaterion.x() = 2;
quaterion.y() = 3;
quaterion.z() = 4;
TTS_EQUAL(quaterion.w(), rotgen::Index{1});
TTS_EQUAL(quaterion.x(), rotgen::Index{2});
TTS_EQUAL(quaterion.y(), rotgen::Index{3});
TTS_EQUAL(quaterion.z(), rotgen::Index{4});
};