Добавление документации по трёхмерным векторам и исправления
This commit is contained in:
parent
e15070ce45
commit
02bcb1bd33
24 changed files with 593 additions and 132 deletions
|
|
@ -5,40 +5,40 @@
|
|||
Функция для **BgcVector2FP32**:
|
||||
|
||||
```c
|
||||
inline void bgc_vector2_reset_fp32(BgcVector2FP32* vector);
|
||||
inline void bgc_vector2_reset_fp32(BgcVector2FP32* vector);
|
||||
```
|
||||
|
||||
Функция для **BgcVector2FP64**:
|
||||
|
||||
```c
|
||||
inline void bgc_vector2_reset_fp64(BgcVector2FP64* vector);
|
||||
inline void bgc_vector2_reset_fp64(BgcVector2FP64* vector);
|
||||
```
|
||||
|
||||
Каждая из данных функции эквивалентна следующим строкам кода:
|
||||
|
||||
```c
|
||||
vector->x1 = 0;
|
||||
vector->x2 = 0;
|
||||
vector->x1 = 0;
|
||||
vector->x2 = 0;
|
||||
```
|
||||
|
||||
 äàííûå ôóíêöèè íå ñëåäóåò ïåðåäàâàòü íåêîððåêòíûå óêàçàòåëè. Çíà÷åíèå NULL (0) òàêæå ñ÷èòàåòñÿ íåêîððåêòíûì.
|
||||
 ïàðàìåòðå **vector** íå ñëåäóåò ïåðåäàâàòü íåêîððåêòíûå óêàçàòåëè. Çíà÷åíèå NULL (0) òàêæå ñ÷èòàåòñÿ íåêîððåêòíûì.
|
||||
|
||||
Пример применения:
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
#include <basic-geometry.h>
|
||||
#include <stdio.h>
|
||||
#include <basic-geometry.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
BgcVector2FP32 my_vector;
|
||||
int main()
|
||||
{
|
||||
BgcVector2FP32 my_vector;
|
||||
|
||||
bgc_vector2_reset_fp32(&my_vector);
|
||||
bgc_vector2_reset_fp32(&my_vector);
|
||||
|
||||
printf("x1 = %f, x2 = %f\n", my_vector.x1, my_vector.x2);
|
||||
printf("x1 = %f, x2 = %f\n", my_vector.x1, my_vector.x2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
[Документация](../intro-rus.md) / [2D векторы](../vector2-rus.md)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue