Create maker functions for Position and Size
This commit is contained in:
32
include/PSX/Auxiliary/literals.hpp
Normal file
32
include/PSX/Auxiliary/literals.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include "../../stdint.h"
|
||||
|
||||
namespace JabyEngine {
|
||||
static constexpr int8_t operator""_i8(unsigned long long int value) {
|
||||
return static_cast<int8_t>(value);
|
||||
}
|
||||
|
||||
static constexpr uint8_t operator""_u8(unsigned long long int value) {
|
||||
return static_cast<uint8_t>(value);
|
||||
}
|
||||
|
||||
// ###################################################################
|
||||
|
||||
static constexpr int16_t operator""_i16(unsigned long long int value) {
|
||||
return static_cast<int16_t>(value);
|
||||
}
|
||||
|
||||
static constexpr uint16_t operator""_u16(unsigned long long int value) {
|
||||
return static_cast<uint16_t>(value);
|
||||
}
|
||||
|
||||
// ###################################################################
|
||||
|
||||
static constexpr int32_t operator""_i32(unsigned long long int value) {
|
||||
return static_cast<int32_t>(value);
|
||||
}
|
||||
|
||||
static constexpr uint32_t operator""_u32(unsigned long long int value) {
|
||||
return static_cast<uint32_t>(value);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user