Переименование s0 -> s, x1 -> x, x2 -> y, x3 -> z, что должно упростить читаемость кода. Также обновление документации
This commit is contained in:
parent
d83ab7160d
commit
b8d383da33
38 changed files with 2104 additions and 2070 deletions
|
|
@ -4,12 +4,17 @@
|
|||
|
||||
### Prefixes
|
||||
|
||||
The library uses prefixes in names of types, constants and functions.
|
||||
C programming language does not have namespaces, thus prefixes often play role
|
||||
of namespaces in C code.
|
||||
|
||||
The library uses prefixes in names of types, constants and functions to avoid
|
||||
name conflict with of othr libraries.
|
||||
|
||||
The main prefix is **BGC** which means **B**asic **G**eometric **C**omputations.
|
||||
|
||||
The structure types have prefix in the form **Bgc**. For example: BgcVector3FP64,
|
||||
BgcVersorFP32, BgcMatrix2x2FP32.
|
||||
The structure types and contstans have prefix in the form **Bgc**. For example:
|
||||
BgcVector3FP64, BGC_FP32_Quaternion, BGC_FP32_Matrix2x2, BGC_FP32_EPSILON,
|
||||
BGC_FP64_TWO_PI.
|
||||
|
||||
The constants have prefix in the form **BGC_**. For example: BGC_EPSYLON_FP32,
|
||||
BGC_TWO_PI_FP64.
|
||||
|
|
@ -31,29 +36,19 @@ Thus there are two suffixes of types:
|
|||
* **FP64** - means **F**loating **P**oint, **64** bit, which corresponds to the
|
||||
**double** type of the C language.
|
||||
|
||||
The types of structures which are based in the **float** type have **FP32** as
|
||||
the type prefix: BgcVector3FP32, BgcMatrix3x2FP32, BgcQuaternionFP32.
|
||||
The constants and the types of structures which are based in the **float** type
|
||||
have **FP32** as the type prefix: BGC_FP32_Vector3, BGC_FP32_Matrix3x2,
|
||||
BGC_FP32_Quaternion, BGC_FP32_PI, BGC_FP32_EPSILON.
|
||||
|
||||
The types of structures which are based in the **double** type have **FP64** as
|
||||
the type prefix: BgcVector2FP64, BgcMatrix2x3FP64, BgcVersorFP64.
|
||||
|
||||
The constants of the **float** type have **_FP32** as the type suffix:
|
||||
BGC_PI_FP32, BGC_EPSYLON_FP32.
|
||||
|
||||
The constants of the **double** type have **_FP64** as the type suffix:
|
||||
BGC_HALF_PI_FP64, BGC_ONE_THIRD_FP64.
|
||||
The constants and the types of structures which are based in the **double** type
|
||||
have **FP64** as the type prefix: BGC_FP64_Vector2, BGC_FP64_Matrix2x3,
|
||||
BGC_FP64_Turn3, BGC_FP64_HALF_PI, BGC_FP64_ONE_THIRD.
|
||||
|
||||
The functions which works with data of the **float** type have **_fp32** as
|
||||
the type suffix: bgc_vector2_get_modulus_fp64, bgc_radians_to_degrees_fp32.
|
||||
the type suffix: bcg_fp32_vector2_get_length, bgc_fp32_radians_to_degrees.
|
||||
|
||||
The functions which works with data of the **double** type have **_fp64** as
|
||||
the type suffix: bgc_vector3_reset_fp64, bgc_radians_normalize_fp64.
|
||||
|
||||
## Entities
|
||||
|
||||
- [Angles](angle-eng.md)
|
||||
- [Vectors 2D](vector2-eng.md)
|
||||
- [Vectors 3D](vector3-eng.md)
|
||||
- [Quaternions](quaternion-eng.md)
|
||||
- [Versors](versor-eng.md)
|
||||
the type suffix: bgc_fp64_vector3_reset, bgc_fp64_normalize_radians.
|
||||
|
||||
Using of such prefixes of a basic type allows to enhance the library with new
|
||||
basic types in future.
|
||||
Loading…
Add table
Add a link
Reference in a new issue