write shit
This commit is contained in:
34
BasaltPresenter/Shared/basalt/math.hpp
Normal file
34
BasaltPresenter/Shared/basalt/math.hpp
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
#include <stdexcept>
|
||||
|
||||
namespace Basalt::Shared::Math {
|
||||
|
||||
using FloatPoint = float;
|
||||
|
||||
struct Vector3 {
|
||||
FloatPoint x, y, z;
|
||||
};
|
||||
struct Vector4 {
|
||||
FloatPoint x, y, z, w;
|
||||
};
|
||||
struct Matrix4x4 {
|
||||
Vector4 data[4];
|
||||
};
|
||||
|
||||
//template<typename TEle, size_t VCnt>
|
||||
// requires(std::integral<TEle> || std::floating_point<TEle>)
|
||||
//struct Vector {
|
||||
// TEle factor[VCnt];
|
||||
//};
|
||||
|
||||
#define NOT_IMPLEMENTED throw std::logic_error("not implemented function");
|
||||
|
||||
template<typename TNum, typename TVec>
|
||||
struct Vector3Traits {};
|
||||
|
||||
template<typename TNum, typename TMat>
|
||||
struct Matrix4x4Traits {};
|
||||
|
||||
#undef NOT_IMPLEMENTED
|
||||
|
||||
} // namespace Basalt::Shared::Math
|
||||
Reference in New Issue
Block a user