Files
Project-Reboot-3.0/Project Reboot 3.0/Vector.h
2023-03-11 09:24:00 -05:00

39 lines
600 B
C++

#pragma once
struct FVector
{
public:
float X;
float Y;
float Z;
FVector operator+(const FVector& A)
{
return FVector{ this->X + A.X, this->Y + A.Y, this->Z + A.Z };
}
FVector operator-(const FVector& A)
{
return FVector{ this->X - A.X, this->Y - A.Y, this->Z - A.Z };
}
FVector operator*(const float A)
{
return FVector{ this->X * A, this->Y * A, this->Z * A };
}
bool operator==(const FVector& A)
{
return X == A.X && Y == A.Y && Z == A.Z;
}
void operator+=(const FVector& A)
{
*this = *this + A;
}
void operator-=(const FVector& A)
{
*this = *this - A;
}
};