more F16 math
This commit is contained in:
parent
c54ff6228c
commit
f1fbbe0faf
3 changed files with 82 additions and 42 deletions
|
|
@ -318,7 +318,7 @@ namespace Crafter {
|
|||
T fLength = Length();
|
||||
|
||||
fLength = 1.0f / fLength;
|
||||
|
||||
|
||||
for(std::uint32_t i = 0; i < Len; i++) {
|
||||
this->v[i] *= fLength;
|
||||
}
|
||||
|
|
@ -480,7 +480,7 @@ template <typename T, std::uint32_t Aligment>
|
|||
struct std::formatter<Crafter::Vector<T, 4, Aligment>> : std::formatter<std::string> {
|
||||
auto format(const Crafter::Vector<T, 4, Aligment>& obj, format_context& ctx) const {
|
||||
return std::formatter<std::string>::format(std::format("{{{}, {}, {}, {}}}",
|
||||
obj.x, obj.y, obj.z, obj.w
|
||||
(float)obj.x, (float)obj.y, (float)obj.z, (float)obj.w
|
||||
), ctx);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue