bgc-c/docs/russian/Vector2.md

25 lines
812 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Двумерные векторы
В библиотеке есть две версии вектора:
- BgFP32Vector2 - вектор одинарной точности
- BgFP64Vector2 - вектор двойной точности
Векторы типа BgFP32Vecto2 для хранения координат использует тип **float** (тип
binary32 стандарта IEEE 754).
Векторы BgFP64Vector2 используют тип **double** (тип binary64 стандарта IEEE 754).
Оба типа представляют собой структуры с двумя полями: **x1** и **x2**.
Определение типов:
typedef struct
{
float x1, x2;
} BgFP32Vector2;
typedef struct
{
double x1, x2;
} BgFP64Vector2;