Улучшение структуры документации
This commit is contained in:
parent
72b6690ad6
commit
f8f6b07c81
20 changed files with 262 additions and 156 deletions
44
docs/vector2/reset-eng.md
Normal file
44
docs/vector2/reset-eng.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Resetting the state of a 2D vector
|
||||
|
||||
These functions set all coordinates of 2D vectors to 0.
|
||||
|
||||
Function for **BgcVector2FP32**:
|
||||
|
||||
```c
|
||||
inline void bgc_vector2_reset_fp32(BgcVector2FP32* vector);
|
||||
```
|
||||
|
||||
Function for **BgcVector2FP64**:
|
||||
|
||||
```c
|
||||
inline void bgc_vector2_reset_fp64(BgcVector2FP64* vector);
|
||||
```
|
||||
|
||||
Each of these functions is equivalent to the following lines of code:
|
||||
|
||||
```c
|
||||
vector->x1 = 0;
|
||||
vector->x2 = 0;
|
||||
```
|
||||
|
||||
You should not pass invalid pointers to these functions. The NULL (0) value is also considered invalid.
|
||||
|
||||
Example of use:
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
#include <basic-geometry.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
BgcVector2FP32 my_vector;
|
||||
|
||||
bgc_vector2_reset_fp32(&my_vector);
|
||||
|
||||
printf("x1 = %f, x2 = %f\n", my_vector.x1, my_vector.x2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
[Back](../vector2-eng.md)
|
44
docs/vector2/reset-rus.md
Normal file
44
docs/vector2/reset-rus.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Сброс состояния двумерного вектора
|
||||
|
||||
Функции устанавливают значение 0 всем координатам двумерных векторов.
|
||||
|
||||
Функция для **BgcVector2FP32**:
|
||||
|
||||
```c
|
||||
inline void bgc_vector2_reset_fp32(BgcVector2FP32* vector);
|
||||
```
|
||||
|
||||
Функция для **BgcVector2FP64**:
|
||||
|
||||
```c
|
||||
inline void bgc_vector2_reset_fp64(BgcVector2FP64* vector);
|
||||
```
|
||||
|
||||
Каждая из данных функции эквивалентна следующим строкам кода:
|
||||
|
||||
```c
|
||||
vector->x1 = 0;
|
||||
vector->x2 = 0;
|
||||
```
|
||||
|
||||
В данные функции не следует передавать некорректные указатели. Значение NULL (0) также считается некорректным.
|
||||
|
||||
Пример применения:
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
#include <basic-geometry.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
BgcVector2FP32 my_vector;
|
||||
|
||||
bgc_vector2_reset_fp32(&my_vector);
|
||||
|
||||
printf("x1 = %f, x2 = %f\n", my_vector.x1, my_vector.x2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
[Назад](../vector2-rus.md)
|
0
docs/vector2/set-values-eng.md
Normal file
0
docs/vector2/set-values-eng.md
Normal file
0
docs/vector2/set-values-rus.md
Normal file
0
docs/vector2/set-values-rus.md
Normal file
Loading…
Add table
Add a link
Reference in a new issue