Добавление функций определения поворотов (versor) между направлениями и базисами

This commit is contained in:
Andrey Pokidov 2025-06-04 23:47:55 +07:00
parent e6a94ab8d9
commit 2a4d5522d3
12 changed files with 784 additions and 287 deletions

View file

Internal server error - Personal Git Server: Beyond coding. We Forge.

500

Internal server error

Forgejo version: 11.0.1+gitea-1.22.0

@ -50,6 +50,94 @@ inline void bgc_vector3_set_values_fp64(const double x1, const double x2, const
destination->x3 = x3;
}
// ================= Directions ================= //
inline int bgc_vector3_get_direction_fp32(const int direction, BgcVector3FP32* vector)
{
switch (direction) {
case BGC_DIRECTION_X1:
vector->x1 = 1.0f;
vector->x2 = 0.0f;
vector->x3 = 0.0f;
return 1;
case BGC_DIRECTION_X2:
vector->x1 = 0.0f;
vector->x2 = 1.0f;