DirectXMath
DirectXMath copied to clipboard
Revisit XMVector*Orthogonal
See Building an Orthonormal Basis from a 3D Unit Vector Without Normalization and Building an Orthonormal Basis, Revisited
FYI
Maybe this can help you with the implementation: C++17 + DirectXMath and this can help you with the analysis of the accuracy: basispy