Исправление структуры документации

This commit is contained in:
Andrey Pokidov 2025-02-08 01:22:19 +07:00
parent f8f6b07c81
commit e15070ce45
20 changed files with 316 additions and 135 deletions

53
docs/versor/reset-eng.md Normal file
View file

@ -0,0 +1,53 @@
# State reset functions for versors
[A versor](../versor-eng.md) that corresponds to no rotation has the following component values:
```
s0 = 1;
x1 = 0;
x2 = 0;
x3 = 0;
```
To set such a state for the versor components, the library has the corresponding functions.
For the **BgFP32Versor** type, the function is:
```c
inline void bgc_versor_reset_fp32(BgFP32Versor* versor);
```
For the **BgFP64Versor** type, the function is:
```c
inline void bgc_versor_reset_fp64(BgFP64Versor* versor);
```
The **versor** parameter must be a valid pointer and must not be NULL.
These functions are well suited for initializing the state of variables of the **BgFP32Versor** and **BgFP64Versor** types.
Usage example:
```c
#include <stdio.h>
#include <basic-geometry.h>
int main() {
BgFP32Versor versor;
bgc_versor_reset_fp32(&versor);
printf("Versor: (%f, %f, %f, %f)\n", versor.s0, versor.x1, versor.x2, versor.x3);
return 0;
}
```
Result:
```
Versor: (1.000000, 0.000000, 0.000000, 0.000000)
```
[Documentation](../intro-eng.md) / [Versors](../versor-eng.md)