diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-08-15 20:15:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-15 20:15:14 +0200 |
| commit | 1ed00dca882118598d14eae315f608af9de758cf (patch) | |
| tree | a157267f0b78c939619cc1a87785db113b61738e /modules | |
| parent | d7ab7ff6be29554fc5287e2b7205dbd96213ae08 (diff) | |
| parent | a8d12b5a613400024eaeea37266cf7cf4bca3724 (diff) | |
| download | redot-engine-1ed00dca882118598d14eae315f608af9de758cf.tar.gz | |
Merge pull request #51694 from RicardRC/constconstconstconstconstconst
Fix compilation with float=64
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/mobile_vr/mobile_vr_interface.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/mobile_vr/mobile_vr_interface.h b/modules/mobile_vr/mobile_vr_interface.h index 29ce0f92c8..0c05dc1ebb 100644 --- a/modules/mobile_vr/mobile_vr_interface.h +++ b/modules/mobile_vr/mobile_vr_interface.h @@ -86,20 +86,20 @@ private: Vector3 mag_next_max; ///@TODO a few support functions for trackers, most are math related and should likely be moved elsewhere - float floor_decimals(float p_value, float p_decimals) { + float floor_decimals(const float p_value, const float p_decimals) { float power_of_10 = pow(10.0f, p_decimals); return floor(p_value * power_of_10) / power_of_10; }; - Vector3 floor_decimals(const Vector3 &p_vector, float p_decimals) { + Vector3 floor_decimals(const Vector3 &p_vector, const float p_decimals) { return Vector3(floor_decimals(p_vector.x, p_decimals), floor_decimals(p_vector.y, p_decimals), floor_decimals(p_vector.z, p_decimals)); }; - Vector3 low_pass(const Vector3 &p_vector, const Vector3 &p_last_vector, float p_factor) { + Vector3 low_pass(const Vector3 &p_vector, const Vector3 &p_last_vector, const float p_factor) { return p_vector + (p_factor * (p_last_vector - p_vector)); }; - Vector3 scrub(const Vector3 &p_vector, const Vector3 &p_last_vector, float p_decimals, float p_factor) { + Vector3 scrub(const Vector3 &p_vector, const Vector3 &p_last_vector, const float p_decimals, const float p_factor) { return low_pass(floor_decimals(p_vector, p_decimals), p_last_vector, p_factor); }; |
