Актуализация документации по проекту
This commit is contained in:
parent
ed404690ed
commit
8ba075b557
16 changed files with 279 additions and 222 deletions
|
|
@ -1,21 +1,21 @@
|
|||
# Copying
|
||||
# Copying of coordinate values
|
||||
|
||||
[Русская версия / Russian version](copy-rus.md)
|
||||
|
||||
The copy functions allow you to copy the coordinate values of one vector to another vector.
|
||||
|
||||
Function for **BGC_FP32_Vector2**:
|
||||
The function for **BGC_FP32_Vector2**:
|
||||
|
||||
```c
|
||||
inline void bgc_fp32_vector2_copy(BGC_FP32_Vector2* const destination, const BGC_FP32_Vector2* const source);
|
||||
```
|
||||
|
||||
Function for **BGC_FP64_Vector2**:
|
||||
The function for **BGC_FP64_Vector2**:
|
||||
|
||||
```c
|
||||
inline void bgc_fp64_vector2_copy(BGC_FP64_Vector2* const destination, const BGC_FP64_Vector2* const source);
|
||||
```
|
||||
|
||||
These functions allow to copy the values of the coordinates of one 2D-vector to another 2D-vector of the same type.
|
||||
|
||||
Each of these functions is equivalent to the following lines of code:
|
||||
|
||||
```c
|
||||
|
|
@ -23,19 +23,16 @@ destination->x = source->x;
|
|||
destination->y = source->y;
|
||||
```
|
||||
|
||||
The **source** and **destination** parameters must be valid pointers.
|
||||
The NULL (0) value is also considered invalid.
|
||||
### Parameters
|
||||
|
||||
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.
|
||||
| Parameter | Direction | Description |
|
||||
| ----------- | ---------- | ----------------------------------------------------------------------- |
|
||||
| destination | out | A pointer to a vector to set coordinate values from *source* |
|
||||
| source | in | A pointer to a vector which coordinates will be copied to *destination* |
|
||||
|
||||
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.
|
||||
The **source** and **destination** parameters must be valid pointers. The NULL (0) value is also considered invalid.
|
||||
|
||||
Example of use:
|
||||
### Example
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
|
|
@ -57,3 +54,4 @@ int main()
|
|||
```
|
||||
|
||||
[Documentation](../intro-eng.md) / [2D vectors](../vector2-eng.md)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,41 +1,38 @@
|
|||
# Копирование
|
||||
# Копирование значений координат
|
||||
|
||||
[English version / Английская версия](copy-eng.md)
|
||||
[English version / Английская версия](copy-eng.md)
|
||||
|
||||
Функции копирования позволяют скопировать значения координат одного вектора
|
||||
в другой вектор.
|
||||
|
||||
Функция для **BGC_FP32_Vector2**:
|
||||
Функция для **BGC_FP32_Vector2**:
|
||||
|
||||
```c
|
||||
inline void bgc_fp32_vector2_copy(BGC_FP32_Vector2* const destination, const BGC_FP32_Vector2* const source);
|
||||
```
|
||||
|
||||
Функция для **BGC_FP64_Vector2**:
|
||||
Функция для **BGC_FP64_Vector2**:
|
||||
|
||||
```c
|
||||
inline void bgc_fp64_vector2_copy(BGC_FP64_Vector2* const destination, const BGC_FP64_Vector2* const source);
|
||||
```
|
||||
|
||||
Каждая из данных функции эквивалентна следующим строкам кода:
|
||||
Функции копирования позволяют скопировать значения координат одного вектора в координаты другого вектора. Оба вектора должны иметь одинаковый тип.
|
||||
|
||||
Каждая из данных функции эквивалентна следующим строкам кода:
|
||||
|
||||
```c
|
||||
destination->x = source->x;
|
||||
destination->y = source->y;
|
||||
```
|
||||
|
||||
Параметры **source** и **destination** должны быть корректными указателями.
|
||||
Значение NULL (0) также считается некорректным.
|
||||
### Параметры
|
||||
|
||||
Параметр **source** должен быть указателем на двумерный вектор, координаты
|
||||
которого должны быть скопированы. Координаты вектора **source** не изменятся
|
||||
после вызова функции.
|
||||
|
||||
Параметр **destination** должен быть указателем на двумерный вектор, координаты
|
||||
которого должны быть изменены. Координаты вектора **destination** после вызова
|
||||
функции станут такими же, как и у вектора **source**.
|
||||
| Параметр | Направление | Описание |
|
||||
| ----------- | ----------- | -------------------------------------------------------------------------------- |
|
||||
| destination | исходящий | Указатель на вектор, в который будут скопированы значения координат из *source* |
|
||||
| source | входящий | Указатель на вектор, координаты которого должны быть скопированы в *destination* |
|
||||
|
||||
Пример применения:
|
||||
Параметры *source* и *destination* должны быть корректными указателями. Значение NULL (0) также считается некорректным.
|
||||
|
||||
### Пример
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
|
|
@ -56,4 +53,6 @@ int main()
|
|||
}
|
||||
```
|
||||
|
||||
[Документация](../intro-rus.md) / [2D векторы](../vector2-rus.md)
|
||||
[Документация](../intro-rus.md) / [Двумерные векторы](../vector2-rus.md)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue