feat: project skeleton, core types and math with transform tests

This commit is contained in:
Martino Ferrari committed 2026-09-27 20:54:19 +02:00
1 parent e4051bc6b5
commit 8a7e9e97f8
21 files changed
+515 -2

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
#pragma once
#include <plot/core/types.hpp>
namespace plot {
enum class ErrorCode {
Ok,
InvalidArgument,
OutOfMemory,
GLFailure,
Unsupported,
NotImplemented,
};
/// Never-null human-readable name of an error code.
const char* to_string(ErrorCode code) noexcept;
/// Result of a fallible operation. Falsy unless `code == ErrorCode::Ok`.
struct Status {
ErrorCode code = ErrorCode::Ok;
const char* message = "";
constexpr explicit operator bool() const noexcept { return code == ErrorCode::Ok; }
};
} // namespace plot