diff --git a/docs/intro-eng.md b/docs/intro-eng.md index 42f56c1..435407e 100644 --- a/docs/intro-eng.md +++ b/docs/intro-eng.md @@ -1,5 +1,7 @@ # Basic Geomtric Computations +[Русская версия / Russian version](intro-rus.md) + ## Naming ### Prefixes @@ -13,14 +15,14 @@ name conflict with of othr libraries. The main prefix is **BGC** which means **B**asic **G**eometric **C**omputations. The structure types and contstans have prefix in the form **Bgc**. For example: -BgcVector3FP64, BGC_FP32_Quaternion, BGC_FP32_Matrix2x2, BGC_FP32_EPSILON, +BGC_FP64_Vector3, BGC_FP32_Quaternion, BGC_FP32_Matrix2x2, BGC_FP32_EPSILON, BGC_FP64_TWO_PI. The constants have prefix in the form **BGC_**. For example: BGC_EPSYLON_FP32, BGC_TWO_PI_FP64. The functions have prefix in the form **bgc_**. For example: -bgc_versor_combine_fp32, bgc_matrix3x3_subtract_fp32. +bgc_fp32_turn3_combine, bgc_fp64_matrix3x3_subtract. ### Suffixes diff --git a/docs/intro-rus.md b/docs/intro-rus.md index 7d2d686..fcab3da 100644 --- a/docs/intro-rus.md +++ b/docs/intro-rus.md @@ -1,5 +1,7 @@ # Библиотека базовых геометрических вычислений +[English version / Английская версия](intro-eng.md) + ## Особенности наименования ### Префиксы @@ -15,7 +17,7 @@ **C**omputations / Базовые Геометрие Вычисления). Для констант и структур данных префикс имеет вид **BGC_**, например: -BgcVector3FP64, BGC_FP32_Quaternion, BGC_FP32_Matrix2x2, BGC_FP32_EPSILON, +BGC_FP64_Vector3, BGC_FP32_Quaternion, BGC_FP32_Matrix2x2, BGC_FP32_EPSILON, BGC_FP64_TWO_PI. Функции имеют префикс в виде **bgc_**, например: bgc_fp32_turn3_combine, @@ -49,4 +51,4 @@ bcg_fp32_vector2_get_length, bgc_fp32_radians_to_degrees. bgc_fp64_vector3_reset, bgc_fp64_normalize_radians. Использование подобных префиксов позволяет расширять библиотеку используя новые -новые базовые типы в будущем. \ No newline at end of file +базовые типы в будущем. \ No newline at end of file diff --git a/docs/quaternion-eng.md b/docs/quaternion-eng.md index 89dde39..04f9462 100644 --- a/docs/quaternion-eng.md +++ b/docs/quaternion-eng.md @@ -1,6 +1,6 @@ # Quaternions -[ / Russian version](quaternion-rus.md) +[Русская версия / Russian version](quaternion-rus.md) Quaternions are hypercomplex numbers that extend the concept of complex numbers. They consist of one real component and three imaginary components: @@ -38,7 +38,7 @@ Structure definitions: ``` Fields: -- **s** is the real part of the quaternion. It is named after the word Scalar. +- **s** is the real part of the quaternion. It is named after the word "scalar". - **x**, **y**, **z** - Imaginary components of the quaternion. [Documentation](intro-eng.md) diff --git a/docs/quaternion-rus.md b/docs/quaternion-rus.md index c7b17e6..f89d073 100644 --- a/docs/quaternion-rus.md +++ b/docs/quaternion-rus.md @@ -39,7 +39,7 @@ q = s + ix + jy + kz Поля: - **s** - это вещественная часть кватерниона, буква выбрана от английского слова -scalar - скалярная величина. +"scalar" - скалярная величина. - **x**, **y**, **z** - мнимые компоненты кватерниона. [Документация](intro-rus.md) diff --git a/docs/vector2-eng.md b/docs/vector2-eng.md index a7cc826..34f94da 100644 --- a/docs/vector2-eng.md +++ b/docs/vector2-eng.md @@ -1,6 +1,6 @@ # Two-dimensional vectors -[ / Russian version](vector2-rus.md) +[Русская версия / Russian version](vector2-rus.md) There are two types of 2D vectors in the library: - **BGC_FP32_Vector2** - vector using single-precision floating-point numbers @@ -22,12 +22,21 @@ Structure definitions: ## Functions -| Funtions for BGC_FP32_Vector2 | Funtions for BGC_FP64_Vector2 | -|:-------------------------------------------------------------:|:-------------------------------------------------------------:| -| [bgc_fp32_vector2_reset](vector2/reset-eng.md) | [bgc_fp64_vector2_reset](vector2/reset-eng.md) | -| [bgc_fp32_vector2_set_values](vector2/set-values-eng.md) | [bgc_fp64_vector2_set_values](vector2/set-values-eng.md) | -| [bgc_fp32_vector2_copy](vector2/copy-eng.md) | [bgc_fp64_vector2_copy](vector2/copy-eng.md) | -| [bgc_fp32_vector2_swap](vector2/swap-eng.md) | [bgc_fp64_vector2_swap](vector2/swap-eng.md) | +- [Reset](vector2/reset-eng.md) + - bgc_fp32_vector2_reset + - bgc_fp64_vector2_reset + +- [Set Values](vector2/set-values-eng.md) + - bgc_fp32_vector2_set_values + - bgc_fp64_vector2_set_values + +- [Copy](vector2/copy-eng.md) + - bgc_fp32_vector2_copy + - bgc_fp64_vector2_copy + +- [Swap](vector2/swap-eng.md) + - bgc_fp32_vector2_swap + - bgc_fp64_vector2_swap [Documentation](intro-eng.md) diff --git a/docs/vector2-rus.md b/docs/vector2-rus.md index 7f6236c..3b47106 100644 --- a/docs/vector2-rus.md +++ b/docs/vector2-rus.md @@ -3,9 +3,9 @@ [English version / Английская версия](vector2-eng.md) В библиотеке есть два типа двумерных векторов: -- **BGC_FP32_Vector3** - вектор с использованием чисел с плавающей запятой +- **BGC_FP32_Vector2** - вектор с использованием чисел с плавающей запятой одинарной точности -- **BGC_FP64_Vector3** - вектор с использованием чисел с плавающей запятой +- **BGC_FP64_Vector2** - вектор с использованием чисел с плавающей запятой двойной точности Определения структур: @@ -24,11 +24,20 @@ ## Функции -| Функции для BGC_FP32_Vector2 | Функции для BGC_FP64_Vector2 | -|:-------------------------------------------------------------:|:-------------------------------------------------------------:| -| [bgc_fp32_vector2_reset](vector2/reset-rus.md) | [bgc_fp64_vector2_reset](vector2/reset-rus.md) | -| [bgc_fp32_vector2_set_values](vector2/set-values-rus.md) | [bgc_fp64_vector2_set_values](vector2/set-values-rus.md) | -| [bgc_fp32_vector2_copy](vector2/copy-rus.md) | [bgc_fp64_vector2_copy](vector2/copy-rus.md) | -| [bgc_fp32_vector2_swap](vector2/swap-rus.md) | [bgc_fp64_vector2_swap](vector2/swap-rus.md) | +- [Сброс](vector2/reset-rus.md) + - bgc_fp32_vector2_reset + - bgc_fp64_vector2_reset + +- [Установка координат](vector2/set-values-rus.md) + - bgc_fp32_vector2_set_values + - bgc_fp64_vector2_set_values + +- [Копирование](vector2/copy-rus.md) + - bgc_fp32_vector2_copy + - bgc_fp64_vector2_copy + +- [Обмен значениями](vector2/swap-rus.md) + - bgc_fp32_vector2_swap + - bgc_fp64_vector2_swap [Документация](intro-rus.md) diff --git a/docs/vector2/copy-eng.md b/docs/vector2/copy-eng.md index a192bd6..4c317ad 100644 --- a/docs/vector2/copy-eng.md +++ b/docs/vector2/copy-eng.md @@ -1,31 +1,39 @@ # Copying +[Русская версия / Russian version](copy-rus.md) + The copy functions allow you to copy the coordinate values of one vector to another vector. -Function for **BgcVector2FP32**: +Function for **BGC_FP32_Vector2**: ```c -inline void bgc_vector2_copy_fp32(const BgcVector2FP32* from, BgcVector2FP32* to); +inline void bgc_fp32_vector2_copy(BGC_FP32_Vector2* const destination, const BGC_FP32_Vector2* const source); ``` -Function for **BgcVector2FP64**: +Function for **BGC_FP64_Vector2**: ```c -inline void bgc_vector2_copy_fp64(const BgcVector2FP64* from, BgcVector2FP64* to); +inline void bgc_fp64_vector2_copy(BGC_FP64_Vector2* const destination, const BGC_FP64_Vector2* const source); ``` Each of these functions is equivalent to the following lines of code: ```c -to->x1 = from->x1; -to->x2 = from->x2; +destination->x = source->x; +destination->y = source->y; ``` -The **from** and **to** parameters must not be invalid pointers. The NULL (0) value is also considered invalid. +The **source** and **destination** parameters must be valid pointers. +The NULL (0) value is also considered invalid. -The **from** parameter must be a pointer to a two-dimensional vector whose coordinates are to be copied. The coordinates of the **from** vector will not change after the function call. +The **source** parameter must be a pointer to a two-dimensional vector whose +coordinates are to be copied. The coordinates of the **source** vector will +not change after the function call. -The **to** parameter must be a pointer to a two-dimensional vector whose coordinates are to be changed. The coordinates of the **to** vector will become the same as those of the **from** vector after the function call. +The **destination** parameter must be a pointer to a two-dimensional vector +whose coordinates are to be changed. The coordinates of the **destination** +vector will become the same as those of the **source** vector after the function +call. Example of use: @@ -35,13 +43,14 @@ Example of use: int main() { - BgcVector2FP32 my_vector1, my_vector2; + BGC_FP32_Vector2 my_vector1, my_vector2; - bgc_vector2_set_values_fp32(-2, 7, &my_vector1); + my_vector1.x = -2.0f; + my_vector1.y = 7.4f; - bgc_vector2_copy_fp32(&my_vector1, &my_vector2); + bgc_fp32_vector2_copy(&my_vector2, &my_vector1); - printf("x1 = %f, x2 = %f\n", my_vector2.x1, my_vector2.x2); + printf("x = %f, y = %f\n", my_vector2.x, my_vector2.y); return 0; } diff --git a/docs/vector2/copy-rus.md b/docs/vector2/copy-rus.md index 28c5950..f4f7c8a 100644 --- a/docs/vector2/copy-rus.md +++ b/docs/vector2/copy-rus.md @@ -1,31 +1,39 @@ # - . +[English version / ](copy-eng.md) - **BgcVector2FP32**: + + . + + **BGC_FP32_Vector2**: ```c -inline void bgc_vector2_copy_fp32(const BgcVector2FP32* from, BgcVector2FP32* to); +inline void bgc_fp32_vector2_copy(BGC_FP32_Vector2* const destination, const BGC_FP32_Vector2* const source); ``` - **BgcVector2FP64**: + **BGC_FP64_Vector2**: ```c -inline void bgc_vector2_copy_fp64(const BgcVector2FP64* from, BgcVector2FP64* to); +inline void bgc_fp64_vector2_copy(BGC_FP64_Vector2* const destination, const BGC_FP64_Vector2* const source); ``` : ```c -to->x1 = from->x1; -to->x2 = from->x2; +destination->x = source->x; +destination->y = source->y; ``` - **from** **to** . NULL (0) . + **source** **destination** . + NULL (0) . - **from** , . **from** . + **source** , + . **source** + . - **to** , . **to** , **from**. + **destination** , + . **destination** + , **source**. : @@ -35,13 +43,14 @@ to->x2 = from->x2; int main() { - BgcVector2FP32 my_vector1, my_vector2; + BGC_FP32_Vector2 my_vector1, my_vector2; - bgc_vector2_set_values_fp32(-2, 7, &my_vector1); + my_vector1.x = -2.0f; + my_vector1.y = 7.4f; - bgc_vector2_copy_fp32(&my_vector1, &my_vector2); + bgc_fp32_vector2_copy(&my_vector2, &my_vector1); - printf("x1 = %f, x2 = %f\n", my_vector2.x1, my_vector2.x2); + printf("x = %f, y = %f\n", my_vector2.x, my_vector2.y); return 0; } diff --git a/docs/vector2/reset-eng.md b/docs/vector2/reset-eng.md index 8333ae5..9f039f4 100644 --- a/docs/vector2/reset-eng.md +++ b/docs/vector2/reset-eng.md @@ -1,27 +1,32 @@ # Resetting the state of a 2D vector +[Русская версия / Russian version](reset-rus.md) + These functions set all coordinates of 2D vectors to 0. -Function for **BgcVector2FP32**: +Function for **BGC_FP32_Vector2**: ```c -inline void bgc_vector2_reset_fp32(BgcVector2FP32* vector); +inline void bgc_fp32_vector2_reset(BGC_FP32_Vector2* const vector); ``` -Function for **BgcVector2FP64**: +Function for **BGC_FP64_Vector2**: ```c -inline void bgc_vector2_reset_fp64(BgcVector2FP64* vector); +inline void bgc_fp64_vector2_reset(BGC_FP64_Vector2* const vector); ``` Each of these functions is equivalent to the following lines of code: ```c -vector->x1 = 0; -vector->x2 = 0; +vector->x = 0; +vector->y = 0; ``` -You should not pass invalid pointers to these functions. The NULL (0) value is also considered invalid. +You should pass valid pointers to these functions. The NULL (0) value is also +considered invalid. + +This function is good for setting up the initial state of a 3D vector. Example of use: @@ -31,11 +36,11 @@ Example of use: int main() { - BgcVector2FP32 my_vector; + BGC_FP32_Vector2 my_vector; - bgc_vector2_reset_fp32(&my_vector); + bgc_fp32_vector2_reset(&my_vector); - printf("x1 = %f, x2 = %f\n", my_vector.x1, my_vector.x2); + printf("x = %f, y = %f\n", my_vector.x1, my_vector.x2); return 0; } diff --git a/docs/vector2/reset-rus.md b/docs/vector2/reset-rus.md index 677f33a..82eebac 100644 --- a/docs/vector2/reset-rus.md +++ b/docs/vector2/reset-rus.md @@ -1,27 +1,32 @@ # +[English version / ](reset-eng.md) + 0 . - **BgcVector2FP32**: + **BGC_FP32_Vector2**: ```c -inline void bgc_vector2_reset_fp32(BgcVector2FP32* vector); +inline void bgc_fp32_vector2_reset(BGC_FP32_Vector2* const vector); ``` - **BgcVector2FP64**: + **BGC_FP64_Vector2**: ```c -inline void bgc_vector2_reset_fp64(BgcVector2FP64* vector); +inline void bgc_fp64_vector2_reset(BGC_FP64_Vector2* const vector); ``` : ```c -vector->x1 = 0; -vector->x2 = 0; +vector->x = 0; +vector->y = 0; ``` - **vector** . NULL (0) . + **vector** . +NULL (0) . + + . : @@ -31,11 +36,11 @@ vector->x2 = 0; int main() { - BgcVector2FP32 my_vector; + BGC_FP32_Vector2 my_vector; - bgc_vector2_reset_fp32(&my_vector); + bgc_fp32_vector2_reset(&my_vector); - printf("x1 = %f, x2 = %f\n", my_vector.x1, my_vector.x2); + printf("x = %f, y = %f\n", my_vector.x1, my_vector.x2); return 0; } diff --git a/docs/vector2/set-values-eng.md b/docs/vector2/set-values-eng.md index 76635a8..8d8cfa2 100644 --- a/docs/vector2/set-values-eng.md +++ b/docs/vector2/set-values-eng.md @@ -1,27 +1,35 @@ # Setting the coordinates of a two-dimensional vector -You can set the coordinates of vectors either directly or using functions. The functions for setting coordinate values allow you to do this in one line. +[Русская версия / Russian version](set-values-rus.md) -Function for **BgcVector2FP32**: +You can set the coordinates of vectors either directly or using functions. +The functions for setting coordinate values allow you to do this in one line. + +Function for **BGC_FP32_Vector2**: ```c -inline void bgc_vector2_set_values_fp32(const float x1, const float x2, BgcVector2FP32* to); +inline void bgc_fp32_vector2_set_values(BGC_FP32_Vector2* const destination, const float x, const float y); ``` -Function for **BgcVector2FP32**: +Function for **BGC_FP64_Vector2**: ```c -inline void bgc_vector2_set_values_fp64(const double x1, const double x2, BgcVector2FP64* to); +inline void bgc_fp64_vector2_set_values(BGC_FP64_Vector2* const destination, const double x, const double y); ``` Each of these functions is equivalent to the following lines of code: ```c -to->x1 = x1; -to->x2 = x2; +destination->x = x; +destination->y = y; ``` -Invalid pointers should not be passed in the **to** parameter. The NULL (0) value is also considered invalid. +Valid pointers should pass in the **destination** parameter. +The NULL (0) value is considered invalid. + +This function is good for setting up the initial values of coordinates with +one-line especially when the values are fixed constants like in the example +below. Example of use: @@ -31,11 +39,11 @@ Example of use: int main() { - BgcVector2FP32 my_vector; + BGC_FP32_Vector2 my_vector; - bgc_vector2_set_values_fp32(-2, 7, &my_vector); + bgc_fp32_vector2_set_values(&my_vector, -2.2f, 7.1f); - printf("x1 = %f, x2 = %f\n", my_vector.x1, my_vector.x2); + printf("x = %f, y = %f\n", my_vector.x, my_vector.y); return 0; } diff --git a/docs/vector2/set-values-rus.md b/docs/vector2/set-values-rus.md index b10f676..c78191e 100644 --- a/docs/vector2/set-values-rus.md +++ b/docs/vector2/set-values-rus.md @@ -1,27 +1,35 @@ # - , . . +[English version / ](set-values-eng.md) - **BgcVector2FP32**: + , . + . + + **BGC_FP32_Vector2**: ```c -inline void bgc_vector2_set_values_fp32(const float x1, const float x2, BgcVector2FP32* to); +inline void bgc_fp32_vector2_set_values(BGC_FP32_Vector2* const destination, const float x, const float y); ``` - **BgcVector2FP32**: + **BGC_FP64_Vector2**: ```c -inline void bgc_vector2_set_values_fp64(const double x1, const double x2, BgcVector2FP64* to); +inline void bgc_fp64_vector2_set_values(BGC_FP64_Vector2* const destination, const double x, const double y); ``` : ```c -to->x1 = x1; -to->x2 = x2; +destination->x = x; +destination->y = y; ``` - **to** . NULL (0) . + **destination** . + NULL (0) . + + +. + . : @@ -31,11 +39,11 @@ to->x2 = x2; int main() { - BgcVector2FP32 my_vector; + BGC_FP32_Vector2 my_vector; - bgc_vector2_set_values_fp32(-2, 7, &my_vector); + bgc_fp32_vector2_set_values(&my_vector, -2.2f, 7.1f); - printf("x1 = %f, x2 = %f\n", my_vector.x1, my_vector.x2); + printf("x = %f, y = %f\n", my_vector.x, my_vector.y); return 0; } diff --git a/docs/vector2/swap-eng.md b/docs/vector2/swap-eng.md index 65915d5..27c7b0d 100644 --- a/docs/vector2/swap-eng.md +++ b/docs/vector2/swap-eng.md @@ -1,24 +1,32 @@ # Swapping -The exchange functions allow two vectors of the same type to exchange coordinate values. +[Русская версия / Russian version](swap-rus.md) -Function for **BgcVector2FP32**: +set-values-rus.md + +The exchange functions allow two vectors of the same type to exchange coordinate +values. + +Function for **BGC_FP32_Vector2**: ```c -inline void bgc_vector2_swap_fp32(BgcVector2FP32* vector1, BgcVector2FP32* vector2); +inline void bgc_fp32_vector2_swap(BGC_FP32_Vector2* const vector1, BGC_FP32_Vector2* const vector2); ``` -Function for **BgcVector2FP32**: +Function for **BGC_FP64_Vector2**: ```c -inline void bgc_vector2_swap_fp64(BgcVector2FP64* vector1, BgcVector2FP64* vector2); +inline void bgc_fp64_vector2_swap(BGC_FP64_Vector2* const vector1, BGC_FP64_Vector2* const vector2); ``` -The **vector1** and **vector2** parameters must not be invalid pointers. The NULL (0) value is also considered invalid. +The **vector1** and **vector2** parameters must be valid pointers. +The NULL (0) value is considered invalid. -Vector **vector1** after calling this function will have the coordinate values that vector **vector2** had before calling the function. +Vector **vector1** after calling this function will have the coordinate values +that vector **vector2** had before calling the function. -And vector **vector2** after calling this function will have the same coordinate values that vector **vector1** had before calling the function. +And vector **vector2** after calling this function will have the same coordinate +values that vector **vector1** had before calling the function. Example of use: @@ -28,15 +36,16 @@ Example of use: int main() { - BgcVector2FP32 my_vector1, my_vector2; + BGC_FP32_Vector2 my_vector1, my_vector2; - bgc_vector2_set_values_fp32(-2, 7, &my_vector1); - bgc_vector2_set_values_fp32(10, -1, &my_vector2); - bgc_vector2_swap_fp32(&my_vector1, &my_vector2); + bgc_fp32_vector2_set_values(&my_vector1, -2, 7); + bgc_fp32_vector2_set_values(&my_vector2, 10, -1); - printf("Vector #1: x1 = %f, x2 = %f\n", my_vector1.x1, my_vector1.x2); - printf("Vector #2: x1 = %f, x2 = %f\n", my_vector2.x1, my_vector2.x2); + bgc_fp32_vector2_swap(&my_vector1, &my_vector2); + + 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); return 0; } diff --git a/docs/vector2/swap-rus.md b/docs/vector2/swap-rus.md index 509fc8e..c2514cf 100644 --- a/docs/vector2/swap-rus.md +++ b/docs/vector2/swap-rus.md @@ -1,24 +1,30 @@ # Обмен -Функции обмена позволяют двум векторам одного типа обменяться значениями координат. +[English version / Английская версия](swap-eng.md) -Функция для **BgcVector2FP32**: +Функции обмена позволяют двум векторам одного типа обменяться значениями +координат. + +Функция для **BGC_FP32_Vector2**: ```c -inline void bgc_vector2_swap_fp32(BgcVector2FP32* vector1, BgcVector2FP32* vector2); +inline void bgc_fp32_vector2_swap(BGC_FP32_Vector2* const vector1, BGC_FP32_Vector2* const vector2); ``` -Функция для **BgcVector2FP32**: +Функция для **BGC_FP64_Vector2**: ```c -inline void bgc_vector2_swap_fp64(BgcVector2FP64* vector1, BgcVector2FP64* vector2); +inline void bgc_fp64_vector2_swap(BGC_FP64_Vector2* const vector1, BGC_FP64_Vector2* const vector2); ``` -Параметры **vector1** и **vector2** не должны быть некорректными указателями. Значение NULL (0) также считается некорректным. +Параметры **vector1** и **vector2** должны быть корректными указателями. +Значение NULL (0) также считается некорректным. -Вектор **vector1** после вызова данной функции будет иметь значения координат, какие имел вектор **vector2** до вызова функции. +Вектор **vector1** после вызова данной функции будет иметь значения координат, +какие имел вектор **vector2** до вызова функции. -А вектор **vector2** после вызова данной функции будет иметь такие же значения координат, какие имел вектор **vector1** до вызова функции. +А вектор **vector2** после вызова данной функции будет иметь такие же значения +координат, какие имел вектор **vector1** до вызова функции. Пример применения: @@ -28,15 +34,16 @@ inline void bgc_vector2_swap_fp64(BgcVector2FP64* vector1, BgcVector2FP64* vecto int main() { - BgcVector2FP32 my_vector1, my_vector2; + BGC_FP32_Vector2 my_vector1, my_vector2; - bgc_vector2_set_values_fp32(-2, 7, &my_vector1); - bgc_vector2_set_values_fp32(10, -1, &my_vector2); - bgc_vector2_swap_fp32(&my_vector1, &my_vector2); + bgc_fp32_vector2_set_values(&my_vector1, -2, 7); + bgc_fp32_vector2_set_values(&my_vector2, 10, -1); - printf("Vector #1: x1 = %f, x2 = %f\n", my_vector1.x1, my_vector1.x2); - printf("Vector #2: x1 = %f, x2 = %f\n", my_vector2.x1, my_vector2.x2); + bgc_fp32_vector2_swap(&my_vector1, &my_vector2); + + 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); return 0; } diff --git a/docs/vector3-eng.md b/docs/vector3-eng.md index 217ddb0..6102563 100644 --- a/docs/vector3-eng.md +++ b/docs/vector3-eng.md @@ -1,6 +1,6 @@ # Three-dimensional vectors -[ / Russian version](vector3-rus.md) +[Русская версия / Russian version](vector3-rus.md) There are two types of 3D vectors in the library: - **BGC_FP32_Vector3** - vector using single-precision floating-point numbers @@ -22,12 +22,20 @@ Structure definitions: ## Functions -| Funtions for BGC_FP32_Vector3 | Funtions for BGC_FP64_Vector3 | -|:-------------------------------------------------------------:|:-------------------------------------------------------------:| -| [bgc_fp32_vector3_reset](vector3/reset-eng.md) | [bgc_fp64_vector3_reset](vector3/reset-eng.md) | -| [bgc_fp32_vector3_set_values](vector3/set-values-eng.md) | [bgc_fp64_vector3_set_values](vector3/set-values-eng.md) | -| [bgc_fp32_vector3_copy](vector3/copy-eng.md) | [bgc_fp64_vector3_copy](vector3/copy-eng.md) | -| [bgc_fp32_vector3_swap](vector3/swap-eng.md) | [bgc_fp64_vector3_swap](vector3/swap-eng.md) | +- [Reset](vector3/reset-eng.md) + - bgc_fp32_vector3_reset + - bgc_fp64_vector3_reset +- [Set Values](vector3/set-values-eng.md) + - bgc_fp32_vector3_set_values + - bgc_fp64_vector3_set_values + +- [Copy](vector3/copy-eng.md) + - bgc_fp32_vector3_copy + - bgc_fp64_vector3_copy + +- [Swap](vector3/swap-eng.md) + - bgc_fp32_vector3_swap + - bgc_fp64_vector3_swap [Documentation](intro-eng.md) diff --git a/docs/vector3-rus.md b/docs/vector3-rus.md index 9be7c1b..45c37e1 100644 --- a/docs/vector3-rus.md +++ b/docs/vector3-rus.md @@ -24,11 +24,20 @@ ## Функции -| Функции для BGC_FP32_Vector3 | Функции для BGC_FP64_Vector3 | -|:-------------------------------------------------------------:|:-------------------------------------------------------------:| -| [bgc_fp32_vector3_reset](vector3/reset-rus.md) | [bgc_fp64_vector3_reset](vector3/reset-rus.md) | -| [bgc_fp32_vector3_set_values](vector3/set-values-rus.md) | [bgc_fp64_vector3_set_values](vector3/set-values-rus.md) | -| [bgc_fp32_vector3_copy](vector3/copy-rus.md) | [bgc_fp64_vector3_copy](vector3/copy-rus.md) | -| [bgc_fp32_vector3_swap](vector3/swap-rus.md) | [bgc_fp64_vector3_swap](vector3/swap-rus.md) | +- [Сброс](vector3/reset-rus.md) + - bgc_fp32_vector3_reset + - bgc_fp64_vector3_reset + +- [Установка координат](vector3/set-values-rus.md) + - bgc_fp32_vector3_set_values + - bgc_fp64_vector3_set_values + +- [Копирование](vector3/copy-rus.md) + - bgc_fp32_vector3_copy + - bgc_fp64_vector3_copy + +- [Обмен значениями](vector3/swap-rus.md) + - bgc_fp32_vector3_swap + - bgc_fp64_vector3_swap [Документация](intro-rus.md) diff --git a/docs/vector3/copy-eng.md b/docs/vector3/copy-eng.md index 54de959..401e27a 100644 --- a/docs/vector3/copy-eng.md +++ b/docs/vector3/copy-eng.md @@ -1,6 +1,6 @@ # Copying -[ / Russian version](copy-rus.md) +[Русская версия / Russian version](copy-rus.md) The copy functions allow you to copy the coordinate values of one vector to another vector. diff --git a/docs/vector3/reset-eng.md b/docs/vector3/reset-eng.md index bafb272..cc3ac0b 100644 --- a/docs/vector3/reset-eng.md +++ b/docs/vector3/reset-eng.md @@ -1,19 +1,19 @@ # Resetting the state of a 3D vector -[ / Russian version](reset-rus.md) +[Русская версия / Russian version](reset-rus.md) These functions set all coordinates of 3D vectors to 0. Function for **BGC_FP32_Vector3**: ```c -inline void bgc_fp32_vector3_reset(BGC_FP32_Vector3* vector); +inline void bgc_fp32_vector3_reset(BGC_FP32_Vector3* const vector); ``` Function for **BGC_FP64_Vector3**: ```c -inline void bgc_fp64_vector3_reset(BGC_FP64_Vector3* vector); +inline void bgc_fp64_vector3_reset(BGC_FP64_Vector3* const vector); ``` Each of these functions is equivalent to the following lines of code: diff --git a/docs/vector3/set-values-eng.md b/docs/vector3/set-values-eng.md index 01dcb27..6bc0d0b 100644 --- a/docs/vector3/set-values-eng.md +++ b/docs/vector3/set-values-eng.md @@ -1,6 +1,6 @@ # Setting the coordinates of a three-dimensional vector -[ / Russian version](set-values-rus.md) +[Русская версия / Russian version](set-values-rus.md) You can set the coordinates of vectors either directly or using functions. The functions for setting coordinate values allow you to do this in one line. diff --git a/docs/vector3/swap-eng.md b/docs/vector3/swap-eng.md index f812727..1870d04 100644 --- a/docs/vector3/swap-eng.md +++ b/docs/vector3/swap-eng.md @@ -1,6 +1,6 @@ # Swapping -[ / Russian version](swap-rus.md) +[Русская версия / Russian version](swap-rus.md) The exchange functions allow two vectors of the same type to exchange coordinate values.