mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-17 23:39:18 +02:00
Replace interpolate with std::lerp and glm::mix
This commit is contained in:
@@ -164,10 +164,10 @@ drivermouse_input::init() {
|
||||
#ifdef _WIN32
|
||||
DWORD systemkeyboardspeed;
|
||||
::SystemParametersInfo( SPI_GETKEYBOARDSPEED, 0, &systemkeyboardspeed, 0 );
|
||||
m_updaterate = interpolate( 0.5, 0.04, systemkeyboardspeed / 31.0 );
|
||||
m_updaterate = std::lerp( 0.5, 0.04, systemkeyboardspeed / 31.0 );
|
||||
DWORD systemkeyboarddelay;
|
||||
::SystemParametersInfo( SPI_GETKEYBOARDDELAY, 0, &systemkeyboarddelay, 0 );
|
||||
m_updatedelay = interpolate( 0.25, 1.0, systemkeyboarddelay / 3.0 );
|
||||
m_updatedelay = std::lerp( 0.25, 1.0, systemkeyboarddelay / 3.0 );
|
||||
#endif
|
||||
|
||||
default_bindings();
|
||||
|
||||
@@ -41,7 +41,7 @@ glm::vec2 circle_to_square( glm::vec2 const &Point, int const Roundness = 0 ) {
|
||||
// Find the inner-roundness scaling factor and LERP
|
||||
auto const length = glm::length( Point );
|
||||
auto const factor = std::pow( length, Roundness );
|
||||
return interpolate( Point, squared, (float)factor );
|
||||
return glm::mix( Point, squared, (float)factor );
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user