Commit 2351e2a7 authored by 潘栩锋's avatar 潘栩锋 🚴

修复 map 的 double 版 bug

parent ad6ef49b
......@@ -582,15 +582,15 @@ namespace Misc
if (old_idx_1 >= data.Count())
old_idx_1 -= data.Count();
if (double.IsNaN(data.ElementAt(old_idx_1)) && double.IsNaN(data.ElementAt(old_idx_0)))
if (!double.IsNaN(data.ElementAt(old_idx_1)) && !double.IsNaN(data.ElementAt(old_idx_0)))
{
data_new[new_idx] = (data.ElementAt(old_idx_1) * (old_idx - o0) + data.ElementAt(old_idx_0) * (o1 - old_idx));
}
else if (double.IsNaN(data.ElementAt(old_idx_0)))
else if (!double.IsNaN(data.ElementAt(old_idx_0)))
{
data_new[new_idx] = data.ElementAt(old_idx_0);
}
else if (double.IsNaN(data.ElementAt(old_idx_1)))
else if (!double.IsNaN(data.ElementAt(old_idx_1)))
{
data_new[new_idx] = data.ElementAt(old_idx_1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment