MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / vec_pretty

Function vec_pretty

include/Helpers/MathExtras.hpp:320–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320template <typename T> std::string vec_pretty(const T& a) {
321 if(a.size() == 0)
322 return "[]";
323 std::stringstream ss;
324 ss << "[";
325 for(size_t i = 0; i < static_cast<size_t>(a.size()); i++) {
326 if(i == static_cast<size_t>(a.size() - 1))
327 ss << a[i] << "]";
328 else
329 ss << a[i] << ", ";
330 }
331 return ss.str();
332}
333
334template <typename T> Vector<T, 2> ensure_points_have_distance(const Vector<T, 2>& a, const Vector<T, 2>& b, T d) {
335 Vector<T, 2> toRet = b;

Callers 1

initialize_sdlFunction · 0.85

Calls 2

sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected