struct FVector
{
float X;
float Y;
float Z;
inline FVector() : X(0), Y(0), Z(0) {}
inline FVector(float x, float y, float z) : X(x), Y(y), Z(z) {}
inline FVector operator + (const FVector& other) const { return FVector(X + other.X, Y + other.Y, Z + other.Z); }
inline FVector operator - (const FVector& other) const { return FVector(X - other.X, Y - other.Y, Z - other.Z); }
inline FVector operator * (float scalar) const { return FVector(X * scalar, Y * scalar, Z * scalar); }
inline FVector operator * (const FVector& other) const { return FVector(X * other.X, Y * other.Y, Z * other.Z); }
inline FVector operator / (float scalar) const { return FVector(X / scalar, Y / scalar, Z / scalar); }
inline FVector operator / (const FVector& other) const { return FVector(X / other.X, Y / other.Y, Z / other.Z); }
inline FVector& operator= (const FVector& other) { X = other.X; Y = other.Y; Z = other.Z; return *this; }
inline FVector& operator+= (const FVector& other) { X += other.X; Y += other.Y; Z += other.Z; return *this; }
inline FVector& operator-= (const FVector& other) { X -= other.X; Y -= other.Y; Z -= other.Z; return *this; }
inline FVector& operator*= (const float other) { X *= other; Y *= other; Z *= other; return *this; }
inline float Dot(const FVector& b) const { return (X * b.X) + (Y * b.Y) + (Z * b.Z); }
inline float MagnitudeSqr() const { return Dot(*this); }
inline float Magnitude() const { return sqrtf(MagnitudeSqr()); }
inline FVector Unit() const
{
const float fMagnitude = Magnitude();
return FVector(X / fMagnitude, Y / fMagnitude, Z / fMagnitude);
}
friend bool operator==(const FVector& first, const FVector& second) { return first.X == second.X && first.Y == second.Y && first.Z == second.Z; }
friend bool operator!=(const FVector& first, const FVector& second) { return !(first == second); }
};