mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-22 21:10:06 +00:00
pica_types: minor cleanup
This commit is contained in:
parent
eddc4a029c
commit
a19166ddec
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <bit>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <boost/serialization/access.hpp>
|
#include <boost/serialization/access.hpp>
|
||||||
@ -50,7 +51,7 @@ public:
|
|||||||
hex = sign;
|
hex = sign;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::memcpy(&res.value, &hex, sizeof(float));
|
res.value = std::bit_cast<float>(hex);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -95,17 +96,17 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
constexpr Float<M, E>& operator/=(const Float<M, E>& flt) {
|
constexpr Float<M, E>& operator/=(const Float<M, E>& flt) {
|
||||||
value /= flt.ToFloat32();
|
value = operator/(flt).value;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Float<M, E>& operator+=(const Float<M, E>& flt) {
|
constexpr Float<M, E>& operator+=(const Float<M, E>& flt) {
|
||||||
value += flt.ToFloat32();
|
value = operator+(flt).value;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Float<M, E>& operator-=(const Float<M, E>& flt) {
|
constexpr Float<M, E>& operator-=(const Float<M, E>& flt) {
|
||||||
value -= flt.ToFloat32();
|
value = operator-(flt).value;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user