Lines Matching refs:roots
51 double roots[3] = {0, 0, 0}; in testCubicRootsReal() local
52 int rootCount = SkDCubic::RootsReal(A, B, C, D, roots); in testCubicRootsReal()
59 std::sort(std::begin(roots), std::begin(roots) + rootCount); in testCubicRootsReal()
62 REPORTER_ASSERT(reporter, sk_double_nearly_zero(roots[i]), in testCubicRootsReal()
63 "0 != %.16f at index %d", roots[i], i); in testCubicRootsReal()
66 sk_doubles_nearly_equal_ulps(expectedRoots[i], roots[i], 64), in testCubicRootsReal()
67 "%.16f != %.16f at index %d", expectedRoots[i], roots[i], i); in testCubicRootsReal()
73 double roots[3] = {0, 0, 0}; in testCubicRootsReal() local
74 int rootCount = SkCubics::RootsReal(A, B, C, D, roots); in testCubicRootsReal()
81 std::sort(std::begin(roots), std::begin(roots) + rootCount); in testCubicRootsReal()
84 REPORTER_ASSERT(reporter, sk_double_nearly_zero(roots[i]), in testCubicRootsReal()
85 "0 != %.16f at index %d", roots[i], i); in testCubicRootsReal()
88 sk_doubles_nearly_equal_ulps(expectedRoots[i], roots[i], 64), in testCubicRootsReal()
89 "%.16f != %.16f at index %d", expectedRoots[i], roots[i], i); in testCubicRootsReal()
251 double roots[3] = {0, 0, 0}; in DEF_TEST() local
253 SkCubics::RootsReal(NAN, 1, 2, 3, roots) == 0, in DEF_TEST()
257 SkCubics::RootsReal(1, NAN, 2, 3, roots) == 0, in DEF_TEST()
261 SkCubics::RootsReal(1, 2, NAN, 3, roots) == 0, in DEF_TEST()
265 SkCubics::RootsReal(1, 2, 3, NAN, roots) == 0, in DEF_TEST()
275 roots); in DEF_TEST()
285 roots); in DEF_TEST()
316 double roots[3] = {0, 0, 0}; in testCubicValidT() local
317 int rootCount = SkDCubic::RootsValidT(A, B, C, D, roots); in testCubicValidT()
324 std::sort(std::begin(roots), std::begin(roots) + rootCount); in testCubicValidT()
327 REPORTER_ASSERT(reporter, sk_double_nearly_zero(roots[i]), in testCubicValidT()
328 "0 != %.16f at index %d", roots[i], i); in testCubicValidT()
331 sk_doubles_nearly_equal_ulps(expectedRoots[i], roots[i], 64), in testCubicValidT()
332 "%.16f != %.16f at index %d", expectedRoots[i], roots[i], i); in testCubicValidT()
338 double roots[3] = {0, 0, 0}; in testCubicValidT() local
339 int rootCount = SkCubics::RootsValidT(A, B, C, D, roots); in testCubicValidT()
346 std::sort(std::begin(roots), std::begin(roots) + rootCount); in testCubicValidT()
349 REPORTER_ASSERT(reporter, sk_double_nearly_zero(roots[i]), in testCubicValidT()
350 "0 != %.16f at index %d", roots[i], i); in testCubicValidT()
353 sk_doubles_nearly_equal_ulps(expectedRoots[i], roots[i], 64), in testCubicValidT()
354 "%.16f != %.16f at index %d", expectedRoots[i], roots[i], i); in testCubicValidT()
360 double roots[3] = {0, 0, 0}; in testCubicValidT() local
361 int rootCount = SkCubics::BinarySearchRootsValidT(A, B, C, D, roots); in testCubicValidT()
368 std::sort(std::begin(roots), std::begin(roots) + rootCount); in testCubicValidT()
370 double delta = std::abs(roots[i] - expectedRoots[i]); in testCubicValidT()
375 "%.16f != %.16f at index %d", expectedRoots[i], roots[i], i); in testCubicValidT()
428 double roots[3] = {0, 0, 0}; in DEF_TEST() local
429 int rootCount = SkDCubic::RootsValidT(A, B, C, D, roots); in DEF_TEST()
432 std::sort(std::begin(roots), std::begin(roots) + rootCount); in DEF_TEST()
433 REPORTER_ASSERT(reporter, sk_double_nearly_zero(roots[0]), "%.16f != 0", roots[0]); in DEF_TEST()
434 … REPORTER_ASSERT(reporter, sk_doubles_nearly_equal_ulps(roots[1], 1), "%.16f != 1", roots[1]); in DEF_TEST()
444 double roots[3] = {0, 0, 0}; in DEF_TEST() local
445 int rootCount = SkDCubic::RootsValidT(A, B, C, D, roots); in DEF_TEST()
448 std::sort(std::begin(roots), std::begin(roots) + rootCount); in DEF_TEST()
449 REPORTER_ASSERT(reporter, sk_double_nearly_zero(roots[0]), "%.16f != 0", roots[0]); in DEF_TEST()