From f402f6851608ba3d09827f6b15fd7ad376cd7c3e Mon Sep 17 00:00:00 2001 From: Andrey Pokidov Date: Mon, 30 Mar 2026 01:48:07 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=87=D0=B8=D1=82=D0=B0=D0=B5=D0=BC=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=B8=20=D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=20=D0=B4=D0=BB=D1=8F=20=D0=B2=D0=B5=D0=BA=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=B2,=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B9=20copy=20?= =?UTF-8?q?=D0=B8=20swap=20=D0=B4=D0=BB=D1=8F=20=D0=BA=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=B5=D1=80=D0=BD=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/quaternion/copy-eng.md | 63 ++++++++++++++++++++++++++++++++++ docs/quaternion/copy-rus.md | 63 ++++++++++++++++++++++++++++++++++ docs/quaternion/reset-eng.md | 10 +++--- docs/quaternion/reset-rus.md | 8 +++-- docs/quaternion/swap-eng.md | 60 ++++++++++++++++++++++++++++++++ docs/quaternion/swap-rus.md | 58 +++++++++++++++++++++++++++++++ docs/vector2/copy-eng.md | 10 +++--- docs/vector2/copy-rus.md | 10 +++--- docs/vector2/reset-eng.md | 6 ++-- docs/vector2/reset-rus.md | 6 ++-- docs/vector2/set-values-eng.md | 6 ++-- docs/vector2/set-values-rus.md | 6 ++-- docs/vector2/swap-eng.md | 12 +++---- docs/vector2/swap-rus.md | 12 +++---- docs/vector3/copy-eng.md | 12 +++---- docs/vector3/copy-rus.md | 12 +++---- docs/vector3/reset-eng.md | 6 ++-- docs/vector3/reset-rus.md | 6 ++-- docs/vector3/set-values-eng.md | 6 ++-- docs/vector3/set-values-rus.md | 6 ++-- docs/vector3/swap-eng.md | 12 +++---- docs/vector3/swap-rus.md | 12 +++---- 22 files changed, 325 insertions(+), 77 deletions(-) create mode 100644 docs/quaternion/copy-eng.md create mode 100644 docs/quaternion/copy-rus.md create mode 100644 docs/quaternion/swap-eng.md create mode 100644 docs/quaternion/swap-rus.md diff --git a/docs/quaternion/copy-eng.md b/docs/quaternion/copy-eng.md new file mode 100644 index 0000000..c2ea491 --- /dev/null +++ b/docs/quaternion/copy-eng.md @@ -0,0 +1,63 @@ +# Copying + +[Русская версия / Russian version](copy-rus.md) + +The copy functions allow you to copy the component values of one quaternion +to another quaternion. + +Function for **BGC_FP32_Quaternion**: + +```c +inline void bgc_fp32_quaternion_copy(BGC_FP32_Quaternion* const destination, const BGC_FP32_Quaternion* const source); +``` + +Function for **BGC_FP64_Quaternion**: + +```c +inline void bgc_fp64_quaternion_copy(BGC_FP64_Quaternion* const destination, const BGC_FP64_Quaternion* const source); +``` + +Each of these functions is equivalent to the following lines of code: + +```c +destination->s = source->s; +destination->x = source->x; +destination->y = source->y; +destination->z = source->z; +``` + +The **source** and **destination** parameters must not be invalid pointers. +The NULL (0) value is also considered invalid. + +The **source** parameter must be a pointer to a quaternion which components +are to be copied. The coordinates of the **source** quaternion will +not change after the function call. + +The **destination** parameter must be a pointer to a quaternion which components +are to be changed. The coordinates of the **destination** quaternion will become +the same as those of the **source** quaternion after the function call. + +Example of use: + +```c +#include +#include + +int main() +{ + BGC_FP32_Quaternion q1, q2; + + q1.s = 1.1f; + q1.x = -2.0f; + q1.y = 7.4f; + q1.z = 1.8f; + + bgc_fp32_quaternion_copy(&q2, &q1); + + printf("s = %f, x = %f, y = %f, z = %f\n", q2.s, q2.x, q2.y, q2.z); + + return 0; +} +``` + +[Documentation](../intro-eng.md) / [Quaternions](../quaternion-eng.md) diff --git a/docs/quaternion/copy-rus.md b/docs/quaternion/copy-rus.md new file mode 100644 index 0000000..c0a98eb --- /dev/null +++ b/docs/quaternion/copy-rus.md @@ -0,0 +1,63 @@ +# Копирование + +[English version / Английская версия](copy-eng.md) + +Функции копирования позволяют скопировать значения компонент одного кватерниона +в другой кватернион. + +Функция для **BGC_FP32_Quaternion**: + +```c +inline void bgc_fp32_quaternion_copy(BGC_FP32_Quaternion* const destination, const BGC_FP32_Quaternion* const source); +``` + +Функция для **BGC_FP64_Quaternion**: + +```c +inline void bgc_fp64_quaternion_copy(BGC_FP64_Quaternion* const destination, const BGC_FP64_Quaternion* const source); +``` + +Каждая из данных функции эквивалентна следующим строкам кода: + +```c +destination->s = source->s; +destination->x = source->x; +destination->y = source->y; +destination->z = source->z; +``` + +Параметры **source** и **destination** должны быть корректными указателями. +Значение NULL (0) также считается некорректным. + +Параметр **source** должен быть указателем на кватернион, компоненты которого +должны быть скопированы. Компоненты кватерниона **source** не изменятся после +вызова функции. + +Параметр **destination** должен быть указателем на кватернионы, компоненты +которого должны быть изменены. Координаты кватерниона **destination** после +вызова функции станут такими же, как и у кватерниона **source**. + +Пример применения: + +```c +#include +#include + +int main() +{ + BGC_FP32_Quaternion q1, q2; + + q1.s = 1.1f; + q1.x = -2.0f; + q1.y = 7.4f; + q1.z = 1.8f; + + bgc_fp32_quaternion_copy(&q2, &q1); + + printf("s = %f, x = %f, y = %f, z = %f\n", q2.s, q2.x, q2.y, q2.z); + + return 0; +} +``` + +[Документация](../intro-rus.md) / [Кватернионы](../quaternion-rus.md) diff --git a/docs/quaternion/reset-eng.md b/docs/quaternion/reset-eng.md index 2080a2e..33b1d9e 100644 --- a/docs/quaternion/reset-eng.md +++ b/docs/quaternion/reset-eng.md @@ -19,8 +19,10 @@ inline void bgc_fp64_quaternion_reset(BGC_FP64_Quaternion* const quaternion); Each of these functions is equivalent to the following lines of code: ```c +vector->s = 0; vector->x = 0; vector->y = 0; +vector->z = 0; ``` You should pass valid pointers to these functions. The NULL (0) value is also @@ -36,14 +38,14 @@ Example of use: int main() { - BGC_FP64_Quaternion quaternion; + BGC_FP64_Quaternion q; - bgc_fp32_quaternion_reset(&quaternion); + bgc_fp64_quaternion_reset(&q); - printf("s = %lf, x = %lf, y = %lf, z = %lf\n", quaternion.s, quaternion.x, quaternion.y, quaternion.z); + printf("s = %lf, x = %lf, y = %lf, z = %lf\n", q.s, q.x, q.y, q.z); return 0; } ``` -[Documentation](../intro-eng.md) / [2D vectors](../quaternion-eng.md) +[Documentation](../intro-eng.md) / [Quaternions](../quaternion-eng.md) diff --git a/docs/quaternion/reset-rus.md b/docs/quaternion/reset-rus.md index b8437fe..94b0dea 100644 --- a/docs/quaternion/reset-rus.md +++ b/docs/quaternion/reset-rus.md @@ -19,8 +19,10 @@ inline void bgc_fp64_quaternion_reset(BGC_FP64_Quaternion* const quaternion); Каждая из данных функции эквивалентна следующим строкам кода: ```c +vector->s = 0; vector->x = 0; vector->y = 0; +vector->z = 0; ``` В параметре **quaternion** следует передавать корректный указатель на @@ -37,11 +39,11 @@ vector->y = 0; int main() { - BGC_FP64_Quaternion quaternion; + BGC_FP64_Quaternion q; - bgc_fp32_quaternion_reset(&quaternion); + bgc_fp64_quaternion_reset(&q); - printf("s = %lf, x = %lf, y = %lf, z = %lf\n", quaternion.s, quaternion.x, quaternion.y, quaternion.z); + printf("s = %lf, x = %lf, y = %lf, z = %lf\n", q.s, q.x, q.y, q.z); return 0; } diff --git a/docs/quaternion/swap-eng.md b/docs/quaternion/swap-eng.md new file mode 100644 index 0000000..07dedc2 --- /dev/null +++ b/docs/quaternion/swap-eng.md @@ -0,0 +1,60 @@ +# Swapping + +[Русская версия / Russian version](swap-rus.md) + +The exchange functions allow two quaternions of the same type to exchange +component values. + +Function for **BGC_FP32_Quaternion**: + +```c +inline void bgc_fp32_quaternion_swap(BGC_FP32_Quaternion* const quarternion1, BGC_FP32_Quaternion* const quarternion2); +``` + +Function for **BGC_FP64_Quaternion**: + +```c +inline void bgc_fp64_quaternion_swap(BGC_FP64_Quaternion* const quarternion1, BGC_FP64_Quaternion* const quarternion2); +``` + +The **quarternion1** and **quarternion2** parameters must be valid pointers. +The NULL (0) value is considered invalid. + +The quaternion **quarternion1** after calling this function will have the same +component values the quaternion **quarternion2** had before calling +the function. + +And the quaternion **quarternion2** after calling this function will have +the same compnent values the quaternion **quarternion1** had before calling +the function. + +Example of use: + +```c +#include +#include + +int main() +{ + BGC_FP32_Quaternion q1, q2; + + bgc_fp32_quaternion_set_values(&q1, 4, -2, 7, 5); + bgc_fp32_quaternion_set_values(&q2, -5, 10, -1, -3); + + bgc_fp32_quaternion_swap(&q1, &q2); + + printf("Quaternion #1: s = %f, x = %f, y = %f, z = %f\n", q1.s, q1.x, q1.y, q1.z); + printf("Quaternion #2: s = %f, x = %f, y = %f, z = %f\n", q2.s, q2.x, q2.y, q2.z); + + return 0; +} +``` + +The console output: + +``` +Quaternion #1: s = -5.000000, x = 10.000000, y = -1.000000, z = -3.000000 +Quaternion #2: s = 4.000000, x = -2.000000, y = 7.000000, z = 5.000000 +``` + +[Documentation](../intro-eng.md) / [Quaternions](../quaternion-eng.md) diff --git a/docs/quaternion/swap-rus.md b/docs/quaternion/swap-rus.md new file mode 100644 index 0000000..8617bb0 --- /dev/null +++ b/docs/quaternion/swap-rus.md @@ -0,0 +1,58 @@ +# Обмен значениями + +[English version / Английская версия](swap-eng.md) + +Функции обмена позволяют двум кватернионам одного типа обменяться значениями +координат. + +Функция для **BGC_FP32_Quaternion**: + +```c +inline void bgc_fp32_quaternion_swap(BGC_FP32_Quaternion* const quarternion1, BGC_FP32_Quaternion* const quarternion2); +``` + +Функция для **BGC_FP64_Quaternion**: + +```c +inline void bgc_fp64_quaternion_swap(BGC_FP64_Quaternion* const quarternion1, BGC_FP64_Quaternion* const quarternion2); +``` + +Параметры **quarternion1** и **quarternion2** должны быть корректными +указателями. Значение NULL (0) также считается некорректным. + +Кватернион **quarternion1** после вызова данной функции будет иметь значения +компонент такие же, какие имел кватернион **quarternion2** до вызова функции. + +А кватернион **quarternion2** после вызова данной функции будет иметь такие же +значения компонет, какие имел кватернион **quarternion1** до вызова функции. + +Пример применения: + +```c +#include +#include + +int main() +{ + BGC_FP32_Quaternion q1, q2; + + bgc_fp32_quaternion_set_values(&q1, 4, -2, 7, 5); + bgc_fp32_quaternion_set_values(&q2, -5, 10, -1, -3); + + bgc_fp32_quaternion_swap(&q1, &q2); + + printf("Quaternion #1: s = %f, x = %f, y = %f, z = %f\n", q1.s, q1.x, q1.y, q1.z); + printf("Quaternion #2: s = %f, x = %f, y = %f, z = %f\n", q2.s, q2.x, q2.y, q2.z); + + return 0; +} +``` + +Вывод в консоль: + +``` +Quaternion #1: s = -5.000000, x = 10.000000, y = -1.000000, z = -3.000000 +Quaternion #2: s = 4.000000, x = -2.000000, y = 7.000000, z = 5.000000 +``` + +[Документация](../intro-rus.md) / [Кватернионы](../quaternion-rus.md) diff --git a/docs/vector2/copy-eng.md b/docs/vector2/copy-eng.md index 4c317ad..e19255a 100644 --- a/docs/vector2/copy-eng.md +++ b/docs/vector2/copy-eng.md @@ -43,14 +43,14 @@ Example of use: int main() { - BGC_FP32_Vector2 my_vector1, my_vector2; + BGC_FP32_Vector2 v1, v2; - my_vector1.x = -2.0f; - my_vector1.y = 7.4f; + v1.x = -2.0f; + v1.y = 7.4f; - bgc_fp32_vector2_copy(&my_vector2, &my_vector1); + bgc_fp32_vector2_copy(&v2, &v1); - printf("x = %f, y = %f\n", my_vector2.x, my_vector2.y); + printf("x = %f, y = %f\n", v2.x, v2.y); return 0; } diff --git a/docs/vector2/copy-rus.md b/docs/vector2/copy-rus.md index f4f7c8a..78b90fe 100644 --- a/docs/vector2/copy-rus.md +++ b/docs/vector2/copy-rus.md @@ -43,14 +43,14 @@ destination->y = source->y; int main() { - BGC_FP32_Vector2 my_vector1, my_vector2; + BGC_FP32_Vector2 v1, v2; - my_vector1.x = -2.0f; - my_vector1.y = 7.4f; + v1.x = -2.0f; + v1.y = 7.4f; - bgc_fp32_vector2_copy(&my_vector2, &my_vector1); + bgc_fp32_vector2_copy(&v2, &v1); - printf("x = %f, y = %f\n", my_vector2.x, my_vector2.y); + printf("x = %f, y = %f\n", v2.x, v2.y); return 0; } diff --git a/docs/vector2/reset-eng.md b/docs/vector2/reset-eng.md index 609f3e3..f64a675 100644 --- a/docs/vector2/reset-eng.md +++ b/docs/vector2/reset-eng.md @@ -36,11 +36,11 @@ Example of use: int main() { - BGC_FP32_Vector2 my_vector; + BGC_FP32_Vector2 v; - bgc_fp32_vector2_reset(&my_vector); + bgc_fp32_vector2_reset(&v); - printf("x = %f, y = %f\n", my_vector.x, my_vector.y); + printf("x = %f, y = %f\n", v.x, v.y); return 0; } diff --git a/docs/vector2/reset-rus.md b/docs/vector2/reset-rus.md index 563a4ab..73fc9d2 100644 --- a/docs/vector2/reset-rus.md +++ b/docs/vector2/reset-rus.md @@ -36,11 +36,11 @@ NULL (0) также считается некорректным. int main() { - BGC_FP32_Vector2 my_vector; + BGC_FP32_Vector2 v; - bgc_fp32_vector2_reset(&my_vector); + bgc_fp32_vector2_reset(&v); - printf("x = %f, y = %f\n", my_vector.x, my_vector.y); + printf("x = %f, y = %f\n", v.x, v.y); return 0; } diff --git a/docs/vector2/set-values-eng.md b/docs/vector2/set-values-eng.md index 8d8cfa2..d1abbca 100644 --- a/docs/vector2/set-values-eng.md +++ b/docs/vector2/set-values-eng.md @@ -39,11 +39,11 @@ Example of use: int main() { - BGC_FP32_Vector2 my_vector; + BGC_FP32_Vector2 v; - bgc_fp32_vector2_set_values(&my_vector, -2.2f, 7.1f); + bgc_fp32_vector2_set_values(&v, -2.2f, 7.1f); - printf("x = %f, y = %f\n", my_vector.x, my_vector.y); + printf("x = %f, y = %f\n", v.x, v.y); return 0; } diff --git a/docs/vector2/set-values-rus.md b/docs/vector2/set-values-rus.md index c78191e..16ec0d4 100644 --- a/docs/vector2/set-values-rus.md +++ b/docs/vector2/set-values-rus.md @@ -39,11 +39,11 @@ destination->y = y; int main() { - BGC_FP32_Vector2 my_vector; + BGC_FP32_Vector2 v; - bgc_fp32_vector2_set_values(&my_vector, -2.2f, 7.1f); + bgc_fp32_vector2_set_values(&v, -2.2f, 7.1f); - printf("x = %f, y = %f\n", my_vector.x, my_vector.y); + printf("x = %f, y = %f\n", v.x, v.y); return 0; } diff --git a/docs/vector2/swap-eng.md b/docs/vector2/swap-eng.md index 27c7b0d..ed7f5f9 100644 --- a/docs/vector2/swap-eng.md +++ b/docs/vector2/swap-eng.md @@ -36,16 +36,16 @@ Example of use: int main() { - BGC_FP32_Vector2 my_vector1, my_vector2; + BGC_FP32_Vector2 v1, v2; - bgc_fp32_vector2_set_values(&my_vector1, -2, 7); - bgc_fp32_vector2_set_values(&my_vector2, 10, -1); + bgc_fp32_vector2_set_values(&v1, -2, 7); + bgc_fp32_vector2_set_values(&v2, 10, -1); - bgc_fp32_vector2_swap(&my_vector1, &my_vector2); + bgc_fp32_vector2_swap(&v1, &v2); - printf("Vector #1: x = %f, y = %f\n", my_vector1.x, my_vector1.y); - printf("Vector #2: x = %f, y = %f\n", my_vector2.x, my_vector2.y); + printf("Vector #1: x = %f, y = %f\n", v1.x, v1.y); + printf("Vector #2: x = %f, y = %f\n", v2.x, v2.y); return 0; } diff --git a/docs/vector2/swap-rus.md b/docs/vector2/swap-rus.md index c2514cf..5404f75 100644 --- a/docs/vector2/swap-rus.md +++ b/docs/vector2/swap-rus.md @@ -34,16 +34,16 @@ inline void bgc_fp64_vector2_swap(BGC_FP64_Vector2* const vector1, BGC_FP64_Vect int main() { - BGC_FP32_Vector2 my_vector1, my_vector2; + BGC_FP32_Vector2 v1, v2; - bgc_fp32_vector2_set_values(&my_vector1, -2, 7); - bgc_fp32_vector2_set_values(&my_vector2, 10, -1); + bgc_fp32_vector2_set_values(&v1, -2, 7); + bgc_fp32_vector2_set_values(&v2, 10, -1); - bgc_fp32_vector2_swap(&my_vector1, &my_vector2); + bgc_fp32_vector2_swap(&v1, &v2); - printf("Vector #1: x = %f, y = %f\n", my_vector1.x, my_vector1.y); - printf("Vector #2: x = %f, y = %f\n", my_vector2.x, my_vector2.y); + printf("Vector #1: x = %f, y = %f\n", v1.x, v1.y); + printf("Vector #2: x = %f, y = %f\n", v2.x, v2.y); return 0; } diff --git a/docs/vector3/copy-eng.md b/docs/vector3/copy-eng.md index 401e27a..98585f4 100644 --- a/docs/vector3/copy-eng.md +++ b/docs/vector3/copy-eng.md @@ -45,15 +45,15 @@ Example of use: int main() { - BGC_FP32_Vector3 my_vector1, my_vector2; + BGC_FP32_Vector3 v1, v2; - my_vector1.x = -2.0f; - my_vector1.y = 7.4f; - my_vector1.z = 1.8f; + v1.x = -2.0f; + v1.y = 7.4f; + v1.z = 1.8f; - bgc_fp32_vector3_copy(&my_vector2, &my_vector1); + bgc_fp32_vector3_copy(&v2, &v1); - printf("x = %f, y = %f, z = %f\n", my_vector2.x, my_vector2.y, my_vector2.z); + printf("x = %f, y = %f, z = %f\n", v2.x, v2.y, v2.z); return 0; } diff --git a/docs/vector3/copy-rus.md b/docs/vector3/copy-rus.md index a888d70..9883250 100644 --- a/docs/vector3/copy-rus.md +++ b/docs/vector3/copy-rus.md @@ -44,15 +44,15 @@ destination->z = source->z; int main() { - BGC_FP32_Vector3 my_vector1, my_vector2; + BGC_FP32_Vector3 v1, v2; - my_vector1.x = -2.0f; - my_vector1.y = 7.4f; - my_vector1.z = 1.8f; + v1.x = -2.0f; + v1.y = 7.4f; + v1.z = 1.8f; - bgc_fp32_vector3_copy(&my_vector2, &my_vector1); + bgc_fp32_vector3_copy(&v2, &v1); - printf("x = %f, y = %f, z = %f\n", my_vector2.x, my_vector2.y, my_vector2.z); + printf("x = %f, y = %f, z = %f\n", v2.x, v2.y, v2.z); return 0; } diff --git a/docs/vector3/reset-eng.md b/docs/vector3/reset-eng.md index cc3ac0b..4b51dab 100644 --- a/docs/vector3/reset-eng.md +++ b/docs/vector3/reset-eng.md @@ -37,11 +37,11 @@ Example of use: int main() { - BGC_FP32_Vector3 my_vector; + BGC_FP32_Vector3 v; - bgc_fp32_vector3_reset(&my_vector); + bgc_fp32_vector3_reset(&v); - printf("x = %f, y = %f, z = %f\n", my_vector.x, my_vector.y, my_vector.z); + printf("x = %f, y = %f, z = %f\n", v.x, v.y, v.z); return 0; } diff --git a/docs/vector3/reset-rus.md b/docs/vector3/reset-rus.md index 75ebad4..0476403 100644 --- a/docs/vector3/reset-rus.md +++ b/docs/vector3/reset-rus.md @@ -37,11 +37,11 @@ vector->z = 0; int main() { - BGC_FP32_Vector3 my_vector; + BGC_FP32_Vector3 v; - bgc_fp32_vector3_reset(&my_vector); + bgc_fp32_vector3_reset(&v); - printf("x = %f, y = %f, z = %f\n", my_vector.x, my_vector.y, my_vector.z); + printf("x = %f, y = %f, z = %f\n", v.x, v.y, v.z); return 0; } diff --git a/docs/vector3/set-values-eng.md b/docs/vector3/set-values-eng.md index 6bc0d0b..29a4aca 100644 --- a/docs/vector3/set-values-eng.md +++ b/docs/vector3/set-values-eng.md @@ -40,11 +40,11 @@ Example of use: int main() { - BGC_FP32_Vector3 my_vector; + BGC_FP32_Vector3 v; - bgc_fp32_vector3_set_values(&my_vector, -2.2f, 7.1f, 10.01f); + bgc_fp32_vector3_set_values(&v, -2.2f, 7.1f, 10.01f); - printf("x = %f, y = %f, z = %f\n", my_vector.x, my_vector.y, my_vector.z); + printf("x = %f, y = %f, z = %f\n", v.x, v.y, v.z); return 0; } diff --git a/docs/vector3/set-values-rus.md b/docs/vector3/set-values-rus.md index 4b5a559..b327329 100644 --- a/docs/vector3/set-values-rus.md +++ b/docs/vector3/set-values-rus.md @@ -41,11 +41,11 @@ destination->z = z; int main() { - BGC_FP32_Vector3 my_vector; + BGC_FP32_Vector3 v; - bgc_fp32_vector3_set_values(&my_vector, -2.2f, 7.1f, 10.01f); + bgc_fp32_vector3_set_values(&v, -2.2f, 7.1f, 10.01f); - printf("x = %f, y = %f, z = %f\n", my_vector.x, my_vector.y, my_vector.z); + printf("x = %f, y = %f, z = %f\n", v.x, v.y, v.z); return 0; } diff --git a/docs/vector3/swap-eng.md b/docs/vector3/swap-eng.md index 1870d04..2b6456f 100644 --- a/docs/vector3/swap-eng.md +++ b/docs/vector3/swap-eng.md @@ -34,15 +34,15 @@ Example of use: int main() { - BGC_FP32_Vector3 my_vector1, my_vector2; + BGC_FP32_Vector3 v1, v2; - bgc_fp32_vector3_set_values(&my_vector1, -2, 7, 5); - bgc_fp32_vector3_set_values(&my_vector2, 10, -1, -3); + bgc_fp32_vector3_set_values(&v1, -2, 7, 5); + bgc_fp32_vector3_set_values(&v2, 10, -1, -3); - bgc_fp32_vector3_swap(&my_vector1, &my_vector2); + bgc_fp32_vector3_swap(&v1, &v2); - printf("Vector #1: x = %f, y = %f, z = %f\n", my_vector1.x, my_vector1.y, my_vector1.z); - printf("Vector #2: x = %f, y = %f, z = %f\n", my_vector2.x, my_vector2.y, my_vector2.z); + printf("Vector #1: x = %f, y = %f, z = %f\n", v1.x, v1.y, v1.z); + printf("Vector #2: x = %f, y = %f, z = %f\n", v2.x, v2.y, v2.z); return 0; } diff --git a/docs/vector3/swap-rus.md b/docs/vector3/swap-rus.md index f667f4e..75e0afc 100644 --- a/docs/vector3/swap-rus.md +++ b/docs/vector3/swap-rus.md @@ -34,15 +34,15 @@ inline void bgc_fp64_vector3_swap(BGC_FP64_Vector3* const vector1, BGC_FP64_Vect int main() { - BGC_FP32_Vector3 my_vector1, my_vector2; + BGC_FP32_Vector3 v1, v2; - bgc_fp32_vector3_set_values(&my_vector1, -2, 7, 5); - bgc_fp32_vector3_set_values(&my_vector2, 10, -1, -3); + bgc_fp32_vector3_set_values(&v1, -2, 7, 5); + bgc_fp32_vector3_set_values(&v2, 10, -1, -3); - bgc_fp32_vector3_swap(&my_vector1, &my_vector2); + bgc_fp32_vector3_swap(&v1, &v2); - printf("Vector #1: x = %f, y = %f, z = %f\n", my_vector1.x, my_vector1.y, my_vector1.z); - printf("Vector #2: x = %f, y = %f, z = %f\n", my_vector2.x, my_vector2.y, my_vector2.z); + printf("Vector #1: x = %f, y = %f, z = %f\n", v1.x, v1.y, v1.z); + printf("Vector #2: x = %f, y = %f, z = %f\n", v2.x, v2.y, v2.z); return 0; }