mirror of
https://github.com/SlimeVR/SlimeVR-Tracker-ESP.git
synced 2026-04-05 17:51:57 +02:00
14 lines
254 B
C++
14 lines
254 B
C++
#include "helper_3dmath.h"
|
|
|
|
float vector_dot(float a[3], float b[3])
|
|
{
|
|
return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
|
|
}
|
|
|
|
void vector_normalize(float a[3])
|
|
{
|
|
float mag = sqrt(vector_dot(a, a));
|
|
a[0] /= mag;
|
|
a[1] /= mag;
|
|
a[2] /= mag;
|
|
} |