Fix to string
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Math.hpp"
|
||||
#include <fmt/format.h>
|
||||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
#include <typeinfo>
|
||||
@@ -109,9 +110,14 @@ namespace OpenVulkano::Math
|
||||
data = (data & !(BITMASK << BITS)) | ((z & BITMASK) << BITS);
|
||||
}
|
||||
|
||||
[[nodiscard]] std::string ToString(const std::string& separator = ", ") const
|
||||
[[nodiscard]] std::string ToString(const std::string& separator) const
|
||||
{
|
||||
return std::to_string(X()) + "," + std::to_string(Y()) + "," + std::to_string(Z());
|
||||
return std::to_string(X()) + separator + std::to_string(Y()) + separator + std::to_string(Z());
|
||||
}
|
||||
|
||||
[[nodiscard]] std::string ToString() const
|
||||
{
|
||||
return fmt::format("{},{},{}", X(), Y(), Z());
|
||||
}
|
||||
|
||||
[[nodiscard]] constexpr operator T() const { return data; }
|
||||
|
||||
Reference in New Issue
Block a user