Переход на версию 0.3: изменение подхода к именованию сущностей, добавление, изменение и удаление ряда функций
This commit is contained in:
parent
d33daf4e2d
commit
f7e41645fe
87 changed files with 4580 additions and 4051 deletions
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
static const int _TEST_FP32_VECTOR2_AMOUNT = 4;
|
||||
|
||||
static const BgcVector2FP32 _TEST_FP32_VECTOR2_LIST1[] = {
|
||||
static const BGC_FP32_Vector2 _TEST_FP32_VECTOR2_LIST1[] = {
|
||||
{ 1.0f, 2.0f },
|
||||
{ -2.0f, -1.0f },
|
||||
{ 100.0f, -100.0f },
|
||||
{ -100.1f, 100.2f }
|
||||
};
|
||||
|
||||
static const BgcVector2FP32 _TEST_FP32_VECTOR2_LIST2[] = {
|
||||
static const BGC_FP32_Vector2 _TEST_FP32_VECTOR2_LIST2[] = {
|
||||
{ 3.6f, 5.3f },
|
||||
{ 204.07f, -781.89f },
|
||||
{ -20.02f, -1.0003f },
|
||||
|
|
@ -24,15 +24,15 @@ static const BgcVector2FP32 _TEST_FP32_VECTOR2_LIST2[] = {
|
|||
|
||||
void test_vector2_swap_fp32()
|
||||
{
|
||||
BgcVector2FP32 vector1, vector2;
|
||||
BGC_FP32_Vector2 vector1, vector2;
|
||||
|
||||
print_testing_name("bgc_vector2_swap_fp32");
|
||||
print_testing_name("bgc_fp32_vector2_swap");
|
||||
|
||||
for (int i = 0; i < _TEST_FP32_VECTOR2_AMOUNT; i++) {
|
||||
bgc_vector2_copy_fp32(&_TEST_FP32_VECTOR2_LIST1[i], &vector1);
|
||||
bgc_vector2_copy_fp32(&_TEST_FP32_VECTOR2_LIST2[i], &vector2);
|
||||
bgc_fp32_vector2_copy(&_TEST_FP32_VECTOR2_LIST1[i], &vector1);
|
||||
bgc_fp32_vector2_copy(&_TEST_FP32_VECTOR2_LIST2[i], &vector2);
|
||||
|
||||
bgc_vector2_swap_fp32(&vector1, &vector2);
|
||||
bgc_fp32_vector2_swap(&vector1, &vector2);
|
||||
|
||||
if (vector1.x1 != _TEST_FP32_VECTOR2_LIST2[i].x1 ||
|
||||
vector1.x2 != _TEST_FP32_VECTOR2_LIST2[i].x2 ||
|
||||
|
|
@ -50,14 +50,14 @@ void test_vector2_swap_fp32()
|
|||
|
||||
static const int _TEST_FP64_VECTOR2_AMOUNT = 4;
|
||||
|
||||
static const BgcVector2FP64 _TEST_FP64_VECTOR2_LIST1[] = {
|
||||
static const BGC_FP64_Vector2 _TEST_FP64_VECTOR2_LIST1[] = {
|
||||
{ 1.0, 2.0 },
|
||||
{ -2.0, -1.0 },
|
||||
{ 100.0, -100.0 },
|
||||
{ -100.1, 100.2 }
|
||||
};
|
||||
|
||||
static const BgcVector2FP64 _TEST_FP64_VECTOR2_LIST2[] = {
|
||||
static const BGC_FP64_Vector2 _TEST_FP64_VECTOR2_LIST2[] = {
|
||||
{ 3.6, 5.3 },
|
||||
{ 204.07, -781.89 },
|
||||
{ -20.02, -1.0003 },
|
||||
|
|
@ -66,15 +66,15 @@ static const BgcVector2FP64 _TEST_FP64_VECTOR2_LIST2[] = {
|
|||
|
||||
void test_vector2_swap_fp64()
|
||||
{
|
||||
BgcVector2FP64 vector1, vector2;
|
||||
BGC_FP64_Vector2 vector1, vector2;
|
||||
|
||||
print_testing_name("bgc_vector2_swap_fp64");
|
||||
print_testing_name("bgc_fp64_vector2_swap");
|
||||
|
||||
for (int i = 0; i < _TEST_FP64_VECTOR2_AMOUNT; i++) {
|
||||
bgc_vector2_copy_fp64(&_TEST_FP64_VECTOR2_LIST1[i], &vector1);
|
||||
bgc_vector2_copy_fp64(&_TEST_FP64_VECTOR2_LIST2[i], &vector2);
|
||||
bgc_fp64_vector2_copy(&_TEST_FP64_VECTOR2_LIST1[i], &vector1);
|
||||
bgc_fp64_vector2_copy(&_TEST_FP64_VECTOR2_LIST2[i], &vector2);
|
||||
|
||||
bgc_vector2_swap_fp64(&vector1, &vector2);
|
||||
bgc_fp64_vector2_swap(&vector1, &vector2);
|
||||
|
||||
if (vector1.x1 != _TEST_FP64_VECTOR2_LIST2[i].x1 ||
|
||||
vector1.x2 != _TEST_FP64_VECTOR2_LIST2[i].x2 ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue