mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
39 lines
600 B
C++
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;
|
|
}
|
|
}; |