mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-08-06 15:35:35 +00:00
CAuiEnergyBarT01: Prevent truncation within DownloadBarCoordFunc
Without float literals, the calculation is performed in double precision and then truncated down to float implicitly.
This commit is contained in:
parent
9c2fd54546
commit
3f06dd0a64
@ -12,7 +12,7 @@ CAuiEnergyBarT01::CAuiEnergyBarT01(const CGuiWidgetParms& parms, CSimplePool* sp
|
||||
}
|
||||
|
||||
std::pair<zeus::CVector3f, zeus::CVector3f> CAuiEnergyBarT01::DownloadBarCoordFunc(float t) {
|
||||
float x = 12.5 * t - 6.25;
|
||||
const float x = 12.5f * t - 6.25f;
|
||||
return {zeus::CVector3f{x, 0.f, -0.2f}, zeus::CVector3f{x, 0.f, 0.2f}};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user