Дополнения в описание проекта / Some addions in the description of the project
This commit is contained in:
parent
2ef0fc17c2
commit
3245407af4
8 changed files with 252 additions and 6 deletions
44
docs/english/Prefixes.md
Normal file
44
docs/english/Prefixes.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
# Prefixes
|
||||
|
||||
The library uses prefixes in names of types, constants and functions.
|
||||
|
||||
The main prefix is **BG** which means **B**asic **G**eometry.
|
||||
|
||||
The structure types have prefix in the form **Bg**. For example: *BgFP64Vector3*,
|
||||
*BgFP32Versor*, *BgFP32Matrix2x2*.
|
||||
|
||||
The constants have prefix in the form **BG_**. For example: *BG_FP32_EPSYLON*,
|
||||
*BG_FP64_TWO_PI*.
|
||||
|
||||
The functions have prefix in the form **bg_**. For example:
|
||||
*bg_fp32_versor_combine*, *bg_fp64_matrix3x3_subtract*.
|
||||
|
||||
A prefix of type follows right after the prefix of the library. The library uses
|
||||
two types of floating point numbers: **float** and **double** (**binary32**
|
||||
and **binary64** types of the **IEEE 754** standard).
|
||||
|
||||
Thus there are two prefixes of types:
|
||||
|
||||
* **FP32** - means **F**loating **P**oint 32 bit, which corresponds to the
|
||||
**float** type of the C language.
|
||||
|
||||
* **FP32** - 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: BgFP32Vector3, BgFP32Matrix3x2, BgFP32Quaternion
|
||||
|
||||
The types of structures which are based in the **double** type have **FP64** as
|
||||
the type prefix: BgFP64Vector2, BgFP64Matrix2x3, BgFP64Versor
|
||||
|
||||
The constants of the **float** type have **FP32_** as the type prefix:
|
||||
BG_FP32_PI, BG_FP32_EPSYLON.
|
||||
|
||||
The constants of the **double** type have **FP64_** as the type prefix:
|
||||
BG_FP64_HALF_PI, BG_FP64_ONE_THIRD.
|
||||
|
||||
The functions which works with data of the **float** type have **fp32_** as
|
||||
the type prefix: bg_fp32_vector2_get_module, bg_fp32_radians_to_degrees.
|
||||
|
||||
The functions which works with data of the **double** type have **fp64_** as
|
||||
the type prefix: bg_fp64_vector3_reset, bg_fp64_radians_normalize.
|
26
docs/english/Vector2.md
Normal file
26
docs/english/Vector2.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Two dimensional vectors
|
||||
|
||||
There are two types for two dimensional vectors:
|
||||
- BgFP32Vector2 for single precision vectors
|
||||
- BgFP64Vector2 for double precision vectors
|
||||
|
||||
Vectors of BgFP32Vecto2 type use **float** (binary32 of IEEE 754) type to store
|
||||
coordinate values.
|
||||
|
||||
Vectors of BgFP64Vecto2 type use **double** (binary64 of IEEE 754) type to store
|
||||
coordinate values.
|
||||
|
||||
The both types are structures with two fields: **x1** and **x2**
|
||||
|
||||
The definition of the types:
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float x1, x2;
|
||||
} BgFP32Vector2;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double x1, x2;
|
||||
} BgFP64Vector2;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue