mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 913228 - Fix floating point math to not round to zero accidentally. r=autra
This commit is contained in:
parent
d625c81d47
commit
df795739bf
@ -92,7 +92,7 @@ abstract class Axis {
|
||||
|
||||
// The values we use for friction are based on a 16.6ms frame, adjust them to currentNsPerFrame:
|
||||
static float getFrameAdjustedFriction(float baseFriction, long currentNsPerFrame) {
|
||||
float framerateMultiplier = currentNsPerFrame / NS_PER_FRAME;
|
||||
float framerateMultiplier = (float)currentNsPerFrame / NS_PER_FRAME;
|
||||
return (float)Math.pow(Math.E, (Math.log(baseFriction) / framerateMultiplier));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user