mirror of
https://github.com/SlimeVR/SlimeVR-Tracker-ESP.git
synced 2026-04-06 02:01:57 +02:00
15 lines
263 B
C++
15 lines
263 B
C++
#include "util.h"
|
|
#include <math.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;
|
|
} |