This commit is contained in:
cinder
2022-10-10 16:09:10 -05:00
parent 7875acf84c
commit c536765e28
2 changed files with 10 additions and 17 deletions

View File

@@ -73,9 +73,9 @@ namespace LibreMetaverse.LslTools
Console.WriteLine("about to pop {0} count is {1}", (object) this.m_depth, (object) yyps.m_stack.Count);
yyps.Pop(ref top, this.m_depth, ns);
if (ns.pos == 0)
{
ns.pos = top.m_value.pos;
}
{
ns.pos = top.m_value.pos;
}
top.m_value = ns;
}

View File

@@ -211,20 +211,13 @@ namespace OpenMetaverse
double sCubed = s * s * s;
double sSquared = s * s;
if (amount == 0f)
{
result = value1;
}
else if (amount == 1f)
{
result = value2;
}
else
{
result = (2d * v1 - 2d * v2 + t2 + t1) * sCubed +
(3d * v2 - 3d * v1 - 2d * t1 - t2) * sSquared +
t1 * s + v1;
}
result = amount switch
{
0f => value1,
1f => value2,
_ => (2d * v1 - 2d * v2 + t2 + t1) * sCubed + (3d * v2 - 3d * v1 - 2d * t1 - t2) * sSquared + t1 * s +
v1
};
return (float)result;
}