Introduce gte float
This commit is contained in:
@@ -20,6 +20,10 @@ namespace JabyEngine {
|
||||
return VECTOR{.x = x, .y = y, .z = z, .pad = 0};
|
||||
}
|
||||
|
||||
static constexpr VECTOR create(gte_float x, gte_float y, gte_float z) {
|
||||
return VECTOR{.x = static_cast<T>(x), .y = static_cast<T>(y), .z = static_cast<T>(z)};
|
||||
}
|
||||
|
||||
template<typename S>
|
||||
static constexpr VECTOR from(const GPU::Position<S>& pos) {
|
||||
return VECTOR::create(static_cast<T>(pos.x), static_cast<T>(pos.y), 0);
|
||||
@@ -39,9 +43,9 @@ namespace JabyEngine {
|
||||
|
||||
static constexpr ROTMATRIX identity() {
|
||||
return ROTMATRIX{.matrix = {
|
||||
{4096, 0, 0},
|
||||
{0, 4096, 0},
|
||||
{0, 0, 4096}
|
||||
{static_cast<int16_t>(gte_float::one()), 0, 0},
|
||||
{0, static_cast<int16_t>(gte_float::one()), 0},
|
||||
{0, 0, static_cast<int16_t>(gte_float::one())}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user