showeq42
12-14-2016, 06:06 PM
The code is converting the run speed from a float to int then back to float. I fixed that, then divided it by a constant to make base run speed 1.000000
Accurate to 7 significant figures now!
*** src/player.cpp 2016-12-14 15:47:56.914853239 -0800
--- src/player.cpp 2016-07-29 09:41:40.403626326 -0700
***************
*** 905,911 ****
emit changeItem(this, tSpawnChangedPosition);
! emit newSpeed((int)lrint(hypot( hypot( (pupdate->deltaX*80),
(pupdate->deltaY*80)),
! (pupdate->deltaZ*80))));
static uint8_t count = 0;
--- 905,911 ----
emit changeItem(this, tSpawnChangedPosition);
! emit newSpeed(hypot( hypot( (pupdate->deltaX*80),
(pupdate->deltaY*80)),
! (pupdate->deltaZ*80))/119.46664);
static uint8_t count = 0;
*** src/interface.cpp 2016-12-14 15:47:56.953854078 -0800
--- src/interface.cpp 2016-07-29 09:39:37.304384827 -0700
***************
*** 4425,4429 ****
QString tempStr;
! tempStr.sprintf("Run Speed: %3.1f", speed);
m_stsbarSpeed->setText(tempStr);
}
--- 4425,4429 ----
QString tempStr;
! tempStr.sprintf("Run Speed: %3.6f", speed);
m_stsbarSpeed->setText(tempStr);
}
Accurate to 7 significant figures now!
*** src/player.cpp 2016-12-14 15:47:56.914853239 -0800
--- src/player.cpp 2016-07-29 09:41:40.403626326 -0700
***************
*** 905,911 ****
emit changeItem(this, tSpawnChangedPosition);
! emit newSpeed((int)lrint(hypot( hypot( (pupdate->deltaX*80),
(pupdate->deltaY*80)),
! (pupdate->deltaZ*80))));
static uint8_t count = 0;
--- 905,911 ----
emit changeItem(this, tSpawnChangedPosition);
! emit newSpeed(hypot( hypot( (pupdate->deltaX*80),
(pupdate->deltaY*80)),
! (pupdate->deltaZ*80))/119.46664);
static uint8_t count = 0;
*** src/interface.cpp 2016-12-14 15:47:56.953854078 -0800
--- src/interface.cpp 2016-07-29 09:39:37.304384827 -0700
***************
*** 4425,4429 ****
QString tempStr;
! tempStr.sprintf("Run Speed: %3.1f", speed);
m_stsbarSpeed->setText(tempStr);
}
--- 4425,4429 ----
QString tempStr;
! tempStr.sprintf("Run Speed: %3.6f", speed);
m_stsbarSpeed->setText(tempStr);
}