chore: format Minecraft.World
This commit is contained in:
1 parent
bd6284025d
commit
33d0737d1d
1511 files changed
+108599
-115459
No files matched your search
@@ -1,21 +1,20 @@
|
||||
#include "../Platform/stdafx.h"
|
||||
#include "SmoothFloat.h"
|
||||
|
||||
SmoothFloat::SmoothFloat()
|
||||
{
|
||||
targetValue = 0.0f;
|
||||
remainingValue = 0.0f;
|
||||
lastAmount = 0.0f;
|
||||
SmoothFloat::SmoothFloat() {
|
||||
targetValue = 0.0f;
|
||||
remainingValue = 0.0f;
|
||||
lastAmount = 0.0f;
|
||||
}
|
||||
|
||||
float SmoothFloat::getNewDeltaValue(float deltaValue, float accelerationAmount)
|
||||
{
|
||||
float SmoothFloat::getNewDeltaValue(float deltaValue,
|
||||
float accelerationAmount) {
|
||||
targetValue += deltaValue;
|
||||
|
||||
deltaValue = (targetValue - remainingValue) * accelerationAmount;
|
||||
lastAmount = lastAmount + (deltaValue - lastAmount) * 0.5f;
|
||||
if ((deltaValue > 0 && deltaValue > lastAmount) || (deltaValue < 0 && deltaValue < lastAmount))
|
||||
{
|
||||
if ((deltaValue > 0 && deltaValue > lastAmount) ||
|
||||
(deltaValue < 0 && deltaValue < lastAmount)) {
|
||||
deltaValue = lastAmount;
|
||||
}
|
||||
remainingValue += deltaValue;
|
||||
@@ -23,7 +22,4 @@ float SmoothFloat::getNewDeltaValue(float deltaValue, float accelerationAmount)
|
||||
return deltaValue;
|
||||
}
|
||||
|
||||
float SmoothFloat::getTargetValue()
|
||||
{
|
||||
return targetValue;
|
||||
}
|
||||
float SmoothFloat::getTargetValue() { return targetValue; }
|
||||
Reference in new issue
Block a user