vector – 3D-Vektor-Mathematik
Zusammenfassung
Kleine C-Bibliothek für Vektoroperationen in 3D und astronomische
Koordinaten mit long double-Präzision. Keine Abhängigkeiten – reine
Rechnerei, bewusst ohne Ballast.
Umfang
vector_3d(x/y/z,long double):vector_add,vector_sub,vector_cross,vector_dot,vector_norm,vector_multiply_scalar,vector_divide_scalar,vector_normalize,vector_distance,vector_clear.- Rotationen:
vector_rotation_x/y/z(r, phi_rad). - Nabla über eine Zeitzeile:
vector_nabla(vector_time_row_t r)(3 Vektoren). - Astronomisch:
vector_cartesian_to_astronomical→vector_astro(Kugelkoordinaten r, phi, theta).
Nutzung
#include <vector/vector.h>
struct vector_3d s = vector_sub(a, b);
ld d = vector_distance(a, b);Abhängigkeiten
Keine weiteren Projekt-Bibliotheken.
Quellen
- Repo: https://github.com/deppenkaiser/vector (public, Apache-2.0)
libraries/vector/vector/vector.h,libraries/vector/vector.c- Build:
cmake -S . -B build && cmake --build build; Einbindung<vector/vector.h>
Verwandte Artikel
- iwt – Referenzprojekt der Modul-Architektur – nutzt
vectorfür die Weber-Kräfte-Dynamik