2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 19:44:55 +00:00

ANIM fixes

This commit is contained in:
Jack Andersen
2016-09-09 19:39:47 -10:00
parent 529223e311
commit a81f35f3e4
7 changed files with 27 additions and 24 deletions

View File

@@ -36,6 +36,14 @@ struct QuantizedValue
{return v[idx];}
const atInt32& operator[] (size_t idx) const
{return v[idx];}
int qFrom(const QuantizedValue& other, size_t idx) const
{
atInt32 delta = std::abs(v[idx] - other.v[idx]);
if (delta == 0)
return 1;
return int(ceilf(log2f(delta))) + 1;
}
};
struct QuantizedRot
{