Работа над документацией по библиотеке
This commit is contained in:
parent
8ba075b557
commit
e2bf8d28a8
17 changed files with 233 additions and 69 deletions
|
|
@ -1,10 +1,7 @@
|
|||
# Copying
|
||||
# Copying of component values
|
||||
|
||||
[Русская версия / Russian version](copy-rus.md)
|
||||
|
||||
The copy functions allow you to copy the component values of one quaternion
|
||||
to another quaternion.
|
||||
|
||||
Function for **BGC_FP32_Quaternion**:
|
||||
|
||||
```c
|
||||
|
|
@ -17,6 +14,8 @@ Function for **BGC_FP64_Quaternion**:
|
|||
inline void bgc_fp64_quaternion_copy(BGC_FP64_Quaternion* const destination, const BGC_FP64_Quaternion* const source);
|
||||
```
|
||||
|
||||
These functions allow to copy the component values of one quaternion to another quaternion.
|
||||
|
||||
Each of these functions is equivalent to the following lines of code:
|
||||
|
||||
```c
|
||||
|
|
@ -26,18 +25,16 @@ destination->y = source->y;
|
|||
destination->z = source->z;
|
||||
```
|
||||
|
||||
The **source** and **destination** parameters must not be invalid pointers.
|
||||
The NULL (0) value is also considered invalid.
|
||||
### Parameters
|
||||
|
||||
The **source** parameter must be a pointer to a quaternion which components
|
||||
are to be copied. The coordinates of the **source** quaternion will
|
||||
not change after the function call.
|
||||
| Parameter | Direction | Description |
|
||||
| ----------- | ---------- | -------------------------------------------------------------------------------- |
|
||||
| destination | out | A pointer to a quaternion to set component values from *source* |
|
||||
| source | in | A pointer to a quaternion which component values will be copied to *destination* |
|
||||
|
||||
The **destination** parameter must be a pointer to a quaternion which components
|
||||
are to be changed. The coordinates of the **destination** quaternion will become
|
||||
the same as those of the **source** quaternion 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>
|
||||
|
|
@ -61,3 +58,4 @@ int main()
|
|||
```
|
||||
|
||||
[Documentation](../intro-eng.md) / [Quaternions](../quaternion-eng.md)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue