Commit 843307bc authored by Nickolas Davis's avatar Nickolas Davis 🥑

fix floating point casting warning in worklet test

parent 18263a37
Pipeline #188145 passed with stages
in 51 minutes and 24 seconds
......@@ -192,7 +192,7 @@ void TestVarianceProperty()
{
condition_number_kv += vtkm::Abs(rp.Get(i) - mean_kv) * vtkm::Abs(rp.Get(i));
}
condition_number_kv *= (2.0f / ((rp.GetNumberOfValues() - 1) * var_kv));
condition_number_kv *= (2.0f / (static_cast<float>(rp.GetNumberOfValues() - 1) * var_kv));
VTKM_TEST_ASSERT(test_equal(var_kv,
4.0 * 4.0 * var_v,
condition_number_kv * std::numeric_limits<vtkm::Float32>::epsilon()));
......@@ -210,7 +210,7 @@ void TestVarianceProperty()
{
condition_number_v += vtkm::Abs(rp.Get(i) - mean_v) * vtkm::Abs(rp.Get(i));
}
condition_number_v *= (2.0f / ((rp.GetNumberOfValues() - 1) * var_v));
condition_number_v *= (2.0f / (static_cast<float>(rp.GetNumberOfValues() - 1) * var_v));
VTKM_TEST_ASSERT(
test_equal(var_v, var_px, condition_number_v * std::numeric_limits<vtkm::Float32>::epsilon()));
......
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