Улучшение читаемости примеров для векторов, добавление описания функций copy и swap для кватернионов
This commit is contained in:
parent
cc3ce1f327
commit
f402f68516
22 changed files with 325 additions and 77 deletions
|
|
@ -19,8 +19,10 @@ inline void bgc_fp64_quaternion_reset(BGC_FP64_Quaternion* const quaternion);
|
|||
Each of these functions is equivalent to the following lines of code:
|
||||
|
||||
```c
|
||||
vector->s = 0;
|
||||
vector->x = 0;
|
||||
vector->y = 0;
|
||||
vector->z = 0;
|
||||
```
|
||||
|
||||
You should pass valid pointers to these functions. The NULL (0) value is also
|
||||
|
|
@ -36,14 +38,14 @@ Example of use:
|
|||
|
||||
int main()
|
||||
{
|
||||
BGC_FP64_Quaternion quaternion;
|
||||
BGC_FP64_Quaternion q;
|
||||
|
||||
bgc_fp32_quaternion_reset(&quaternion);
|
||||
bgc_fp64_quaternion_reset(&q);
|
||||
|
||||
printf("s = %lf, x = %lf, y = %lf, z = %lf\n", quaternion.s, quaternion.x, quaternion.y, quaternion.z);
|
||||
printf("s = %lf, x = %lf, y = %lf, z = %lf\n", q.s, q.x, q.y, q.z);
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
[Documentation](../intro-eng.md) / [2D vectors](../quaternion-eng.md)
|
||||
[Documentation](../intro-eng.md) / [Quaternions](../quaternion-eng.md)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue