2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-01 05:33:29 +00:00

Merge pull request #226 from lioncash/clamp

CAnimSource: Simplify ClampZeroToOne()
This commit is contained in:
Luke Street 2020-03-15 19:45:37 -04:00 committed by GitHub
commit 797c583ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@
namespace urde {
static float ClampZeroToOne(float in) { return std::max(0.f, std::min(1.f, in)); }
static constexpr float ClampZeroToOne(float in) { return std::clamp(in, 0.0f, 1.0f); }
u32 RotationAndOffsetStorage::DataSizeInBytes(u32 rotPerFrame, u32 transPerFrame, u32 frameCount) {
return (transPerFrame * 12 + rotPerFrame * 16) * frameCount;