mirror of
https://github.com/R2Northstar/NorthstarLauncher
synced 2026-08-23 20:26:04 -04:00
Copies of over the primedev folder structure for easier cherry-picking of further changes Co-authored-by: F1F7Y <filip.bartos07@proton.me>
47 lines
571 B
C++
47 lines
571 B
C++
#include <cmath>
|
|
|
|
#pragma once
|
|
|
|
union Vector3
|
|
{
|
|
struct
|
|
{
|
|
float x;
|
|
float y;
|
|
float z;
|
|
};
|
|
|
|
float raw[3];
|
|
|
|
void MakeValid()
|
|
{
|
|
for (auto& fl : raw)
|
|
if (std::isnan(fl))
|
|
fl = 0;
|
|
}
|
|
|
|
// todo: more operators maybe
|
|
bool operator==(const Vector3& other)
|
|
{
|
|
return x == other.x && y == other.y && z == other.z;
|
|
}
|
|
};
|
|
|
|
union QAngle
|
|
{
|
|
struct
|
|
{
|
|
float x;
|
|
float y;
|
|
float z;
|
|
float w;
|
|
};
|
|
|
|
float raw[4];
|
|
|
|
// todo: more operators maybe
|
|
bool operator==(const QAngle& other)
|
|
{
|
|
return x == other.x && y == other.y && z == other.z && w == other.w;
|
|
}
|
|
};
|