Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
This commit is contained in:
@@ -205,7 +205,7 @@ void MobileVRInterface::set_position_from_sensors() {
|
||||
Vector3 axis = grav_adj.cross(down);
|
||||
axis.normalize();
|
||||
|
||||
Basis drift_compensation(axis, acos(dot) * delta_time * 10);
|
||||
Basis drift_compensation(axis, std::acos(dot) * delta_time * 10);
|
||||
orientation = drift_compensation * orientation;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -94,8 +94,8 @@ private:
|
||||
|
||||
///@TODO a few support functions for trackers, most are math related and should likely be moved elsewhere
|
||||
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;
|
||||
float power_of_10 = std::pow(10.0f, p_decimals);
|
||||
return std::floor(p_value * power_of_10) / power_of_10;
|
||||
}
|
||||
|
||||
Vector3 floor_decimals(const Vector3 &p_vector, const float p_decimals) {
|
||||
|
||||
Reference in New Issue
Block a user