jabyengine/include/PSX/Auxiliary/word_helper.hpp

16 lines
297 B
C++

#pragma once
#include <stddef.hpp>
namespace JabyEngine {
using word_t = uint32_t;
static constexpr size_t bytes_to_words(size_t bytes) {
return bytes/sizeof(word_t);
}
static constexpr size_t words_to_bytes(size_t words) {
return words*sizeof(word_t);
}
}