From 2193dfcbc1e00bf83df7f220a71db4df927e5d6b Mon Sep 17 00:00:00 2001 From: "W2.Wizard" <63303990+W2Wizard@users.noreply.github.com> Date: Tue, 2 Mar 2021 00:10:43 +0100 Subject: [PATCH 1/2] Use remap function instead --- Source/Engine/Visject/VisjectGraph.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Engine/Visject/VisjectGraph.cpp b/Source/Engine/Visject/VisjectGraph.cpp index 939013ebd..581641e24 100644 --- a/Source/Engine/Visject/VisjectGraph.cpp +++ b/Source/Engine/Visject/VisjectGraph.cpp @@ -379,9 +379,8 @@ void VisjectExecutor::ProcessGroupMath(Box* box, Node* node, Value& value) const Vector2 rangeB = tryGetValue(node->GetBox(2), node->Values[2]).AsVector2(); const bool clamp = tryGetValue(node->GetBox(3), node->Values[3]).AsBool; - auto mapFunc = rangeB.X + (inVal - rangeA.X) * (rangeB.Y - rangeB.X) / (rangeA.Y - rangeA.X); + auto mapFunc = Math::Remap(inVal, rangeA.X, rangeA.Y, rangeB.X, rangeB.Y); - // Clamp value? value = clamp ? Math::Clamp(mapFunc, rangeB.X, rangeB.Y) : mapFunc; break; } From a7d0853519db802b9eea155d8bfe82cf624c1b17 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Wed, 3 Mar 2021 18:58:53 +0100 Subject: [PATCH 2/2] Update .gitignore --- .gitignore | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index f9a58f31c..3511a7723 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ Cache/ Binaries/ Logs/ Source/*.csproj +/Package_*/ !Source/Engine/Debug # User-specific files @@ -22,11 +23,6 @@ Source/*.csproj *.VisualState.xml TestResult.xml -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - # NuGet Packages Directory packages/**/* !packages/repositories.config @@ -56,9 +52,6 @@ packages/**/* *.svclog *.scc -# Chutzpah Test files -_Chutzpah* - # Visual C++ cache files ipch/ *.aps @@ -72,12 +65,6 @@ ipch/ *.vsp *.vspx -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper @@ -100,9 +87,6 @@ _NCrunch_* *.mm.* AutoTest.Net/ -# Web workbench (sass) -.sass-cache/ - # Installshield output folder [Ee]xpress/