fix ldflags typo and other compile errors

This commit is contained in:
2024-01-27 16:54:07 +01:00
parent a71a5ea2bc
commit 22e19c7a97
3 changed files with 20 additions and 26 deletions

View File

@@ -2,7 +2,7 @@
namespace blitz {
struct EMASmoother {
class EMASmoother {
private:
float Alpha;
public:

View File

@@ -1,36 +1,30 @@
#include <cmath>>
#include <cmath>
#include <cassert>
#include "blitz/common/Smoothing.h"
namespace blitz {
struct EMASmoother {
private:
float Alpha;
public:
float Current;
EMASmoother::EMASmoother() : Alpha(1.0f), Current(0.0f) {}
EMASmoother::EMASmoother() : Alpha(1.0f), Current(0.0f) {}
void EMASmoother::TickUnitT(float target) {
Current += Alpha * (target - Current);
}
void TickUnitT(float target) {
Current += Alpha * (target - Current);
}
void EMASmoother::Tick(float target, float delta) {
Current += std::powf(Alpha, delta) * (target - Current);
}
void Tick(float target, float delta) {
Current += std::powf(Alpha, delta) * (target - Current);
}
float EMASmoother::GetAlpha() {
return Alpha;
}
float GetAlpha() {
return Alpha;
}
void EMASmoother::SetAlpha(float alpha) {
assert(0.0f < alpha && alpha <= 1.0f);
Alpha = alpha;
}
void SetAlpha(float alpha) {
assert(0.0f < alpha && alpha <= 1.0f);
Alpha = alpha;
}
void SetSmoothingTime(float t) {
Alpha = 0.999f;
}
void EMASmoother::SetSmoothingTime(float t) {
Alpha = 0.999f;
};
}

View File

@@ -64,7 +64,7 @@ target("BlitzClient")
if is_plat("macosx") then
add_frameworks("OpenGL")
elseif is_plat("windows") then
add_ldflags("/LCTG") -- fix compiltation of glbinding
add_ldflags("/LTCG") -- fix compiltation of glbinding
end
-- Assets