41 lines
846 B
C
41 lines
846 B
C
#include "./quaternion_reset.h"
|
|
|
|
#include "./../../helpers.h"
|
|
|
|
void test_quaternion_reset_fp32()
|
|
{
|
|
BGC_FP32_Quaternion vector;
|
|
|
|
print_testing_name("bgc_fp32_quaternion_reset");
|
|
|
|
bgc_fp32_quaternion_reset(&vector);
|
|
|
|
if (vector.s0 != 0.0f || vector.x1 != 0.0f || vector.x2 != 0.0f || vector.x3 != 0.0f) {
|
|
print_testing_failed();
|
|
return;
|
|
}
|
|
|
|
print_testing_success();
|
|
}
|
|
|
|
void test_quaternion_reset_fp64()
|
|
{
|
|
BGC_FP64_Quaternion vector;
|
|
|
|
print_testing_name("bgc_fp64_quaternion_reset");
|
|
|
|
bgc_fp64_quaternion_reset(&vector);
|
|
|
|
if (vector.s0 != 0.0 || vector.x1 != 0.0 || vector.x2 != 0.0 || vector.x3 != 0.0) {
|
|
print_testing_failed();
|
|
return;
|
|
}
|
|
|
|
print_testing_success();
|
|
}
|
|
|
|
void test_quaternion_reset()
|
|
{
|
|
test_quaternion_reset_fp32();
|
|
test_quaternion_reset_fp64();
|
|
}
|