mirror of
https://github.com/Mr-X-GTA/GTAV-Classes-1.git
synced 2024-12-22 14:37:31 +08:00
script vector3: add to_string and << operator overload (#119)
This commit is contained in:
parent
9d951d0e32
commit
a7eee8d5cc
@ -1,5 +1,8 @@
|
||||
#pragma once
|
||||
#include "../rage/vector.hpp"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <ostream>
|
||||
|
||||
namespace rage
|
||||
{
|
||||
@ -64,6 +67,19 @@ namespace rage
|
||||
return this->x != other.x || this->y != other.y || this->z != other.z;
|
||||
}
|
||||
|
||||
std::string to_string() const
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << *this;
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const scrVector& vec)
|
||||
{
|
||||
os << "(" << vec.x << ", " << vec.y << ", " << vec.z << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
alignas(8) float x{};
|
||||
alignas(8) float y{};
|
||||
alignas(8) float z{};
|
||||
|
Loading…
Reference in New Issue
Block a user